|
xekon Apprentice
Joined: 11 Oct 2007 Posts: 154
|
Posted: Thu May 15, 2008 11:08 pm
Storing %roomvnum for destination room, half way through a speedwalk. |
Storing %roomvnum for destination room, half way through a speedwalk.
There is a zone that when you speedwalk to it you get a random entry point, and that zone you have to go through to get to like 5 other zones.
Currently I have it setup so that when it enters the zone and gets dropped into a random room an alias fires, this alias does the following:
Code: |
#STOP
vgXcoord=""
vgYcoord=""
vgYcount=""
#T+ vidtrig
#T- "vidmap"
bigmap |
Then a couple triggers fire that figure out my coordinates on the map, and at the end of the map i get:
Code: |
#SAY "Your Coordinates: "@vgXcoord" "@vgYcoord
#TE %roomvnum(%concat(@vgXcoord," ",@vgYcoord))
#T- vidtrig |
What this does is when I enter the zone it looks at a map, and figures out my location, and then sets my location. So now I am in the random entrance zone.... BUT I stopped my Speedwalk, I wasnt finished, I just needed to pass through this zone to get to the next. So before I issue my #STOP I need to somehow get the vnum of the room I am headed to stored into a variable (this way I can issue a #walk after setting my position in the zone correctly.), I was thinking there is probably a way I could use the path that is remaining in the speedwalk to extrapolate the room I am headed to and store the vnum, but im just not sure how to go about doing it.
Anyone have any good ideas? |
|
|
|
Anaristos Sorcerer
Joined: 17 Jul 2007 Posts: 821 Location: California
|
Posted: Thu May 15, 2008 11:18 pm |
IMO (and that is the way I do it and hope someone here will post a better way), you have to write a synchronization routine which will match the room name and exits against the map database (don't panic, it's trigger-driven and fast). Rather than trying to figure out how to resume the speedwalk, I would just find a path from where I am now (since I've successfully located myself) to the target. That is, I would break the speedwalk from the source to the random room, synchronize the map, and then speedwalk from where I am to where I am going. The advantage of this synchronization routine is that it can be used anywhere where one loses track of one's position. For instance, if your speedwalk is interrupted by fighting, you can call the synchronization routine and it will relocate you while you are fighting!
(Let the flaming begin!) |
|
_________________ Sic itur ad astra. |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Fri May 16, 2008 12:42 am |
Code: |
#SAY "Your Coordinates: "@vgXcoord" "@vgYcoord
$Dest=%destroom
#TE %roomvnum(%concat(@vgXcoord," ",@vgYcoord))
#WALK $Dest
#T- vidtrig |
|
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
Anaristos Sorcerer
Joined: 17 Jul 2007 Posts: 821 Location: California
|
Posted: Fri May 16, 2008 12:59 am |
Nice, Vigilante. I, however, can't use that because I use fast mode with %walk() (actually, I use %pathfrom(), which is equivalent) so the #TELEPORT locates me at the final destination. That is why I use a synchronization routine. Like everything else, it has its advantages and disadvantages, but I like speed. Also, it works in flee situations and in navigating mazes. In the instance we are dealing with here, I make the assumption that I enter the zone at the same place each time (the center of the zone, to be exact), then I proceed with the speedwalk as if I were correct. The synchronization routine makes the final adjustment using a linear transformation technique. A suggestion on improving this process would be appreciated.
EDIT: The zone is topologically equivalent to a deformed sphere.
EDIT: I made this sound like I was doing something scientific , but I am not. Basically, I just get how many rooms (x,y,z) I am off by and adjust accordingly. |
|
_________________ Sic itur ad astra. |
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|