Hi
Setting up a Timer
You set a Timer by adding this where it needs to start:
Code: ags
1= Timer number and 800 is loops...40 loops a second.. so 20 seconds =800.
Then you need to put this in the Repeatedly execute Event of that Room:
Code: ags
if you want the Timer to Repeat simply add 'SetTimer' again at the end.
Check out:
'SetTimer' and 'IsTimerExpired' in the Manual.
Hope this helps..
Setting up a Timer
You set a Timer by adding this where it needs to start:
SetTimer(1,800);
1= Timer number and 800 is loops...40 loops a second.. so 20 seconds =800.
Then you need to put this in the Repeatedly execute Event of that Room:
function room_RepExec()
{
if (IsTimerExpired(1)) {
PUT HERE WHAT YOU WANT TO HAPPEN AFTER THE 20 SECONDS IS UP
}
}
if you want the Timer to Repeat simply add 'SetTimer' again at the end.
Check out:
'SetTimer' and 'IsTimerExpired' in the Manual.
Hope this helps..