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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
robert
Wanderer


Joined: 25 Feb 2004
Posts: 98

PostPosted: Wed Oct 05, 2011 12:22 pm   

Safe Walking doesn't keep up.
 
Hey All,

I was wondering if anyone else has seen Safe walking not keeping up, and had a good fix. I have my own #OK trig, and if I do a long safe walk, some of the #OKs do not get recognized. To resolve this I added a counter when I do a #OK like so:
#IF (@saferunning) {
queuedoks = @queuedoks+1
#OK
}

Then in my onRoomEnter event, I subtract from queuedoks. Also if after subtracting the queuedoks is greater than 1, I do #ALARM +0.01 #OKs until queued oks is back to 0 like so:
#IF (@queuedoks > 0) {#ALARM queuedoks +0.01 {
#SA Queued OKs = @queuedoks
#OK
handlequeuedoks
} SafeWalkClass}

This all works just fine, except I wish I knew I was in the destination room as soon as I got the room description instead of a few textlines afterwards.

Anyone have a solution that makes CMud keep up with the Safe Walk without any #ALARMS or WAITs such that CMud's Map will be behind?

Thanks!
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4662
Location: Pensacola, FL, USA

PostPosted: Wed Oct 05, 2011 5:14 pm   
 
Have yo recongigured the mapper since you made the #OK trigger?
Have you made any #TAG, #NOMAP, or #NODIR triggers?
Have you reconfigured the mapper since every such trigger has been made?
_________________
Discord: Shalimarwildcat
Reply with quote
robert
Wanderer


Joined: 25 Feb 2004
Posts: 98

PostPosted: Wed Oct 05, 2011 6:04 pm   
 
I am not sure if I reconfigured the MAP with the #OK, but I disabled the auto #OK in the map configuration settings. I can try this sometime to see if a reconfigure will solve the issue.

I have #TAGs, and I have reconfigured the map since I made those. I probably should recheck to make sure no #NOMAP or #NODIR triggers are being called. That definitely has caused me trouble before.

I have seen #OK issues with slow walking if I #OK before OnRoomEnter is hit for the movement, but that is easily fixed as I am trying to move slowly. I fixed this by waiting for the OnRoomEnter before doing the #OK for the room I just entered. If I do this, my slow walk is flawless. In this case I want a fast movement, but know when I am at the destination room. I suspect, but haven't recently verified that the OnRoomEnter is not being called before I get the text for the next room such that the #OK Fails. It goes something like this:

Room1
#OK1
OnRoomEnter1
Room2
#OK2
Room3
#OK3
OnRoomEnter2

It is possible that I had a #NODIR trigger in the middle of that which would cause such behavior I believe. I will need to double check as this is an old issue I just am getting to again now, and I have forgotten what all I did. :( I will reply later with a script debugger log.
Reply with quote
robert
Wanderer


Joined: 25 Feb 2004
Posts: 98

PostPosted: Mon Oct 10, 2011 4:23 pm   
 
I double checked. There are no #NOMAPs or #NODIRs being called. Also, I tried to reconfigure the map, and the behavior with the mapper doing the #OKs for you, and you doing your own is very different with Safe walk. However, when I disable the mapper #OK, and use my own the problem with safe walk resurfaces.

If you let the mapper do the #OKs, and run script debugger you can see that CMud receives all of the room descriptions first, updates the map location, and then displays the mud text and runs the triggers for that text, etc. There is some obvious delay before it displays the text as it is waiting for the map location to update first. It would be nice if you could implement your own trigger and #OK logic, that would run at this priority.

I am thinking about doing this with just fast walk instead, but implementing my own version. All I was really looking for was if I was finished entering the movement commands, as the commands should work almost all the time. I am thinking I would do a #WALK to the room before the desired destination and do a mud command like a tell to myself to indicate that I have gotten there, and send the last direction. Then I will know I am entering the destination room, and will get there fast.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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