In my game you need to do a certain event before 20 real-time minutes pass but I haven't figured out how to stop the timer when you accomplish this event. How would I get rid of the timer.
From the manual (http://www.adventuregamestudio.co.uk/wiki/Game_/_Global_functions#SetTimer):
"Pass TIMEOUT as 0 to disable a currently running timer."
Isn't it true that timers "cancel" it self after they run out?
Think you want to setup your timer to run 20 minutes. And if I remember correctly (please correct me if I'm wrong, an not that good at math) the game runs at 40 cycles a second, which means 20min*60sec*40cycles=48000.
So, that would mean you need to set you timer to 48000. And then check for when it's run out. If you don't start that timer again in your code, then that should do it.
Yeah, Cassie, but op asked about cancelling the timer, so it wouldn't run out. Tzachs explained how to just that.
Tzachs, how would that look like in code?
SetTimer(my_timer_id, 0);
I had an issue with a timer starting inside a room, but not finishing before I left the room. When I came back in the room, things went haywire. I had to cancel it when leaving the room, just in case the player left before it ran out.
Not that this is relevant here, but just for reference.
I am still having trouble on cancelling timers. Here is what I am asking: How do you make sure a timer DOESN'T run out. You need to a get to a certain area in a certain time limit afterwards the timer should go away. How do I do this?
Mario, don't start a new topic when you're just following up on an earlier question. tzachs already gave you the answer, so if you couldn't get it to work, show what went wrong.
Yeah, sorry about that. I just was stressed a little. But it turns out a just had a real stupid moment and actually put in my timer id instead of the actual ID. I didn't realize my mistake until after I put that up. Again, sorry.