Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Arphaxad
Novice


Joined: 09 Oct 2000
Posts: 36
Location: USA

PostPosted: Sun Mar 13, 2005 2:13 pm   

Slow walking with a delay
 
Good evening,
I'm looking for some help in controlling the a slow walk when the Mud has a built in delay when moving from room to room. The delay varies, either there isn't a delay or there is one of up to a minute or so. I have set up a trigger to pause the slow walk when there is a delay. The issue I am having is if the trigger fires a little early, the mapper sends the next step and updates the position even though I haven't actually moved.

Before posting sample output let me explain how timing works on this mud, to include movement. Some actions incur a time delay during which you can not take any other action, if you attempt another action you are asked to wait until the time expires. These lines follow the action:
[Round: 5 seconds]
Attempting something before time expires yields this output:
[Wait: 3 seconds]
Here's what the output looks like generically:
> You walk south down the road.

General name here - more specific name
Next comes a rather nice and detailed description of the room detail all sorts of nice things within the room. It can be long or short, regardless they are good.
Something is here.
Exits: north, south
[Round: 5 seconds]


Now if I try to move before 5 seconds expire I'll get the following line:

R> [Wait: 2 seconds]

Now, I use the #pause command to pause the slow walk and wait 5 seconds before sending #step. Everything works fine unless for some reason it fires a little early and causes a wait. I've tried using #pause and #stop in a trigger on the wait, but neither produce the desired effect.

I hope this make sense and someone out there can give me a hand.
Thanks,

Arphaxad Confused
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Sun Mar 13, 2005 4:08 pm   
 
#ALIAS onroomenter {#IF (%inwalk) {#PAUSE;#T+ StepTime}}
#TR "StepTime" {~[Round: (%d) seconds~]} {#ALARM "StepDelay" {+%1} {#STEP};#T- StepTime}
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
Arphaxad
Novice


Joined: 09 Oct 2000
Posts: 36
Location: USA

PostPosted: Sun Mar 13, 2005 10:03 pm   
 
Vijilante,

Thanks for the quick reply. I like the use of the alias and onroomenter, it should streamline my script when handling slowwalking. I'll fold this routine and test it. But I'm not sure it will fix the issue of the mapper erroneously updating the position or stalling if the #step is executed while still in "Round Time" generating a [Wait: X seconds]? One of two things happen:

1. If I do not have a trigger for the [Wait: x seconds] the speedwalk just stalls. The mapper updates the position with the next step but hasn't really moved because of the wait.

2. If I use a trigger (Very similar to the one you've provided) for the [Wait: x seconds] it doesn't behave correctly either. I've tried both #pause and #stop. It appears that the #step changes the position without confirming that I'm in the next room. Which I am not.

I'll let you know how this portion works out.

Thanks,
Arphaxad
Reply with quote
Maelstrom
Apprentice


Joined: 10 Feb 2005
Posts: 158

PostPosted: Mon Mar 14, 2005 2:21 am   
 
You need to tell the mapper it cant move in that direction so it wont update. Usually as simple as a one line trigger.

#TRIGGER {^R> ~[Wait: %d seconds~]$} {#NODIR} {case}
Reply with quote
Arphaxad
Novice


Joined: 09 Oct 2000
Posts: 36
Location: USA

PostPosted: Mon Mar 14, 2005 3:30 am   
 
"Ah I see said the blindman"

Maelstrom,
Thanks a bunch. I didn't realize that #nodir is usable during speedwalking. I was under the impression that it was only used in map creation. I'll plug this in as well.

Thanks all for the help, sometimes it only takes another set of eyes. It didn't seem so simple at the time. Embarassed

Arphaxad Cool
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
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

© 2009 Zugg Software. Hosted by Wolfpaw.net