You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What I'm suggesting here is a GetTimer() function, which simply returns the number of cycles left on a timer. My reason for this is twofold. Firstly, sometimes you'll want to be able to do something in the middle of a timer, without setting up another timer. Secondly, it would provide a way to see whether or not a timer is running, without incurring the IsTimerExpired()'s OFF state.
@eri0o this is the problem with the current Timer implementation. It stays at 1 UNTIL user calls IsTimerExpired.
Add IsTimerExpired check somewhere in the script, and that should fix this infinite timer.
https://github.com/adventuregamestudio/ags-manual/wiki/Globalfunctions_General#settimer
This function returns the remaining ticks for the timer timerID. It will return 0 when the timer is not running and 1 when it's expiring.
There are 20 available timers, with timerIDs from 1 to 20. This function will error if the timerID is invalid, either lower than 1 or bigger than 20.
problem: can't figure a good example for this, perhaps a bomb with a counter in a label?
Needs a See also to
SetTimer
.The text was updated successfully, but these errors were encountered: