Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ General
➜ Detecting successful moves
Detecting successful moves
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Auren
(5 posts) Bio
|
Date
| Tue 30 Aug 2005 03:56 AM (UTC) |
Message
| I have a little script set up that allows me to use the mapper in Zmud to track my position (follow only so far) from within MUSHclient. The challenge for me now is reliably keeping my position and the map in sync.
I'm using the keypad to navigate, each key is set up to call an alias with a direction as the first wildcard. I set a variable to indicate that I am attempting to move, and another for the direction I'm moving. I enable a trigger to catch a room name to indicate the move was successful. Triggers for failure messages clear both variables. If the room name trigger fires, it sends the command to zmud to update the map position. Theres is a check in there so that if I attempt to move and a move is still in progress, the new command is ignored.
Now, as long as I move relatively slowly, all is well, but if I move quickly, sometimes, the map loses track. Is there a better/more accurate way I could do this? | Top |
|
Posted by
| Ked
Russia (524 posts) Bio
|
Date
| Reply #1 on Wed 31 Aug 2005 12:29 AM (UTC) |
Message
| The problem is that when you send movement commands faster than the replies for them arrive from the MUD, your direction variable will keep going out of synch with the triggers, because it is always set for the last command sent but retrieved by the triggers for the first command sent.
The solution would be to use a list instead of a single variable, so that you would add each new direction to the start of that list and make the triggers use and remove it. That way, no matter how many commands you send, the first one will always be used by the triggers first.
If you do that, however, you would need to keep the movement triggers permanently enabled, at least as long as you want your movement to be tracked on the map. | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
11,174 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top