Stop the timer (SOLVED)

Started by Freydall, Sat 17/06/2006 13:10:01

Previous topic - Next topic

Freydall

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.
AEscplega is the best epic ever. Chapter I is finally finished and Chapter II is on it's way.

Ashen

#1
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).
I know what you're thinking ... Don't think that.

Freydall

AEscplega is the best epic ever. Chapter I is finally finished and Chapter II is on it's way.

SMF spam blocked by CleanTalk