Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Freydall on Sat 17/06/2006 13:10:01

Title: Stop the timer (SOLVED)
Post by: Freydall on Sat 17/06/2006 13:10:01
Quick and easy problem... I know how to set the timer and to set what ever you want to happen when the timer expires but I don't know how to stop the timer.
Title: Re: Stop the timer
Post by: Ashen on Sat 17/06/2006 13:44:54
Setting the timer to 0 (e.g. SetTimer(1,0);) should end the countdown without running the IsTimerExpired condition. Alternatively, you could make the condition also dependant on a variable (e.g. if(IsTimerExpired(1) && MyInt == 0) {), and change it when you want to 'stop' the timer (i.e. if MyInt is any non-zero value, the condition won't run).
Title: Re: Stop the timer
Post by: Freydall on Sat 17/06/2006 13:46:28
Cheers!