|
ReedN Wizard
Joined: 04 Jan 2006 Posts: 1279 Location: Portland, Oregon
|
Posted: Fri Jan 13, 2006 8:25 pm
Getting serial operation of commands in alias |
I have an alias which goes like this:
(Do action)
#walk location1
(Do action)
#walk location2
(Do action)
#walk location3
(Do action)
What happends is that it doesn't wait for the #walk to finish it just sort of starts them all up at the same time. I'd like to know how I can get it to wait for the #walk to reach its destination before doing the action on the next line. |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Sat Jan 14, 2006 12:37 am |
Issueing a #WALK command produce a path, then begins sending that path accorind your walk mode setting. Once that completes zMud is done processing that command and waiting for the next command. What you are really looking for it the special alias onwalkend. Currently this hs a bug in which it never executes, the work around is to use the onroomenter with a check for %roomnum=%destroom. Obviously if you are at your desitination then the walk is ending and you can issue new command that were dependant on that condition. Personally I suggest putting "#IF (%roomnum()=%destroom) {onwalkend}" as the last line in your onroomenter alias. Thus allowing you to remove the work around when the bug is fixed by only removing 1 line of code.
|
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
ReedN Wizard
Joined: 04 Jan 2006 Posts: 1279 Location: Portland, Oregon
|
Posted: Sun Jan 15, 2006 5:18 am |
There is something going wrong with %destroom. When I double click to speedwalk somewhere it will be the proper destination number for a few rooms, then it changes to -1 and never changes back.
|
|
|
|
|
|