Reset a TIMER

Started by PERXEO, Wed 24/05/2023 15:08:01

Previous topic - Next topic

PERXEO

I see that in AGS there are only two functions (as far as I know), which have to do with TIMER. One is
Code: ags
SetTimer(int timer_id, int timeout)
and the other is
Code: ags
bool IsTimerExpired(int timer_id)
.
However, I would like to know how to override a SetTimer once it has started, ie something like StopTimer or ResetTimer. In any case, how do you cancel a timer so that it starts again from zero?

Nahuel

Hey there, to override the timer, you set it again. if you want to stop the timer just

Code: ags
SetTimer(timerNumber, 0;

https://adventuregamestudio.github.io/ags-manual/Globalfunctions_General.html?highlight=timer%20timers&case_sensitive=1#settimer

QuotePass TIMEOUT as 0 to disable a currently running timer.
Life isn't a game. Let's develop a life-like-game.

PERXEO

Oh thanks!! Il'l try it!!

SMF spam blocked by CleanTalk