|
Dumas Enchanter
Joined: 11 Feb 2003 Posts: 511 Location: USA
|
Posted: Fri Feb 23, 2007 12:51 am
#ALARM vs System Time |
I created an alarm trigger to go off every second to use with a countdown timer. What I am seeing is that over the time of the countdown, the alarm seems to lead the time from my MUD.
My example uses a timer that runs for 900 seconds in the game. Every second, my alarm trigger reduces the variable that contains this value by 1. After a couple hundred seconds, and sometimes even sooner, the value in my variable is less than what the game is telling me is left on what I am tracking.
This common? Is if fixable? |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Fri Feb 23, 2007 3:19 am |
This means that whatever unit of time your MUD is using, it's not 1 second per unit of time, or your lag is varying enough to affect the timer. A good way to check would be to create something like this:
#trig {You have (%d) seconds left} {#say %time(mm:ss.zzz)}
and then run the command that displays the time left twice. You can then compare the number of real seconds that have elapsed with the number that the MUD thinks have elapsed and see if the MUD's time is always different or if it varies due to lag or something else.
Equally, though, if you're waiting for something that the MUD gives you feedback on, why not just create a trigger to parse the time information out of the message? |
|
|
|
Dumas Enchanter
Joined: 11 Feb 2003 Posts: 511 Location: USA
|
Posted: Fri Feb 23, 2007 3:31 am |
I will check on the time difference. I don't believe there is any time difference and I wondered if lag would affect it so much.
This trigger is an extension of the last topic I made about tracking multiple abilities in multiple rooms. I got that part to work and moved to making a countdown occur. I tried different times to use, and 1 second was the best for that. So, basically I have a trigger that loops through a string list, and for each one loops through a record variable based on the string list value and decrements the value of any key by 1. The value of the timer is a set value that doesn't come up with the trigger message and is checked using a separate command.
This issue doesn't kill my tracking system, just a minor irritation I decided to get some feedback on. Since my own countdown timer ends first, the ability at worst will be about 20 seconds behind and therefore I'm safe. |
|
|
|
|
|
|
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
|
|