HOW TO MAKE THE TIMER WORK PROPERLY?

Posts

Pages: 1
Yeah, another silly question by soulkeeper here.

So I just wanted to ask: How does the timer work? I tried using it in a dummy game I made. I set it to start at 30s, then added a condition that if the timer is == 0, then enter gameover scene. But as I tested it, the timer would be stuck at :29. Didn't move anywhere past that. For some reason, the timer loathes me. Aider moi.


PS: It couldn't be a script conflict, since I rarely use custom scripts. I try to find eventing workarounds for everything. And neither could it be an event conflict, since that was the only event on the map (unless if you count the player starting position).
Marrend
Guardian of the Description Thread
20932
Try activating a self-switch after the timer-set event, then, create a new event-page (the one with the GAME OVER event?). There, set the conditions of the event-pages's activation to being the self-switch you just set being on.

*Edit: The GAME OVER event should probably be either an "Autorun" or "Parallel Process". My preference would be "Parallel Process", but, experiment with both to see what the difference is.
author=Marrend
Try activating a self-switch after the timer-set event, then, create a new event-page (the one with the GAME OVER event?).


I don't really understand this part. If the self-switch is activated, and the GameOver event page is on autorun/par proc, then won't that immediately trigger the gameover scene?
Marrend
Guardian of the Description Thread
20932
author=karins_soulkeeper
If the self-switch is activated, and the GameOver event page is on autorun/par proc, then won't that immediately trigger the gameover scene?


Well, no. What you do on that page is Control Variables. Under the "Other" option is "timer". I figure that, if you choose the "Set" operation, that will cause the selected variable to be equal to the amount of time left on the timer. Then, do a Conditional Branch, and check to see if that variable is equal to 0. If it is, GAME OVER. I don't think you need an "else" clause for this?
Oh, so you set the timer to a variable? I see. I think this is what was wrong.
Thanks @Marrend!
Pages: 1