[16 Sep 2010] is Timeout running?
Posted: Sat Jun 13, 2020 5:32 pm
Note: This is an archived post that was originally sent to the Hollywood mailing list on Thu, 16 Sep 2010 21:32:46 +0200
Hello!
In a game I use SetTimeout() for random action. If the user exits to the game the running timeout should be cancelled. If I use ClearTimeout() when the timeout is finished already then I got an error. I can't check Timeout with GetAttribute if it is finished.
I made a workaround like this:
However I think it would be more useful if ClearTimeout() just ignore if the given timeout is not running.
Hello!
In a game I use SetTimeout() for random action. If the user exits to the game the running timeout should be cancelled. If I use ClearTimeout() when the timeout is finished already then I got an error. I can't check Timeout with GetAttribute if it is finished.
I made a workaround like this:
Code: Select all
SetTimeout(10,Function() EndFunction,1)