Setting up a thirty second timer.

Started by Furwerkstudio, Mon 01/03/2021 02:30:53

Previous topic - Next topic

Furwerkstudio

I was wondering how does one set up a thirty second timer, I did look up timers but I could not figure out how the cycles worked in relation to seconds.

Gilbert

Code: ags
SetTimer(1, GetGameSpeed()*30);


GetGameSpeed() returns the frame(cycle) rate your game is current running at. For example, if your game is running at 40 FPS (AGS default), you can set the time to 40*30 = 1200 cycles for 30 seconds.

SMF spam blocked by CleanTalk