H
howdiie
Guest
How do I insert a time range so that my game ends after say 4 minutes
This will indeed work most of the time, but if your pc can't run the number of frames room_speed defines it will start to lag behind, to solve this you can use:Create a controller object, and in the create event, use the alarm set action (or type alarm[0] = ...) to set an alarm to 4 minutes (the time is measured in steps, and fps is in steps per second, so 4 minutes would be room_speed*60*4)
Then in the alarm event, just put the code you need when the time is up.
create:
time = 60 * mins;
step:
time = (time - (delta_time*1.000.000))
if(time <= 0)
{
//do something
}