SetTimer (int timer_id, int timeout)
Starts timer TIMER_ID ticking - it will tick once every game loop (normally
40 times per second), until TIMEOUT loops, after which it will stop.
You can check whether the timer has finished by calling the IsTimerExpired
function.
Pass TIMEOUT as 0 to disable a currently running timer.
There are 20 available timers, with TIMER_IDs from 1 to 20.
Example:
SetTimer(1,1000);
will set the timer 1 to expire after 1000 game cycles.
See Also: IsTimerExpired
|