EnableTimer false true at_time Over time will not cancel

Posted by Flyme on Tue 11 Jun 2013 01:09 AM — 2 posts, 10,597 views.

#0
Example :
now time 7:55
add a timer ,<at the time> 8:00:00 ,Enabled, <label> test ,<send> say hello ,ok
Game --> immediate EnableTimer("test",false) run

now time 8:01

Game --> immediate EnableTimer("test",true) run

world say hello? Over time will not cancel?
Australia Forum Administrator #1
Timers do not necessarily fire at the exact moment you specify (the client may be busy doing other things) so they fire at or after the time you requested.


To work around this you must reset the timer so its fire time is recalculated.

eg.


EnableTimer ("test", true)
ResetTimer  ("test")


If you do this in the immediate window they must be done together or the timer will fire before you reset it. eg.


EnableTimer ("test", true); ResetTimer  ("test")