I want to make a parallel process that triggers the time to count down when conditions are met. I've read some posts that the timer doesn't count down on a parallel process. How do I make a timer count down?
timer doesn't count down
RPG Maker MV SupportThink you can do it this way. Set a variable to the number you want to count down from, in a loop subtract 1 every 60 frames, when variable hits 0 do something.
Control variable #777 Timer = 10;
If : condition
Control variable #777 Timer -=1
If Timer = 0
Do something
End
If : condition
Control variable #777 Timer -=1
If Timer = 0
Do something
End
Show a Picture of your whole Eventpage,
when we see how you build it, we can tell you how to fix it.
Else i would suggest to try something like this:
Parallel Event:
If Switch1 is Off do turn Switch1 On and start Timer.
else
If Timer is 0 turn Switch1 Off and do what should happen when Timer ends.
end
A parallel Event trys to repeat itself up to 60 Times per Second.
That is why you need Conditions and Values to stop the Timer being reinitialised again and again from start.
when we see how you build it, we can tell you how to fix it.
Else i would suggest to try something like this:
Parallel Event:
If Switch1 is Off do turn Switch1 On and start Timer.
else
If Timer is 0 turn Switch1 Off and do what should happen when Timer ends.
end
A parallel Event trys to repeat itself up to 60 Times per Second.
That is why you need Conditions and Values to stop the Timer being reinitialised again and again from start.
AquaEcho - This script doesn't appear to actually set the timer. I only see a variable called "Timer", but not a command to activate the timer.
If: condition activates it. Since OP didn't clarify the condition, I left it generic.
Neither of these ideas involve a command to set the timer. Only a variable called "timer" which will not render the timer onscreen. I am confused.
Control variable #777 Timer = 10;
If : condition
Control variable #777 Timer -=1
If Timer = 0
Do something
End
I tried this and it still doesn't count seconds. It instantly dropped from 10 to 0.
If : condition
Control variable #777 Timer -=1
If Timer = 0
Do something
End
I tried this and it still doesn't count seconds. It instantly dropped from 10 to 0.
Here is my common event which is a parallel process. The timer starts at 0:09 and does not change. "Time is up" never fires.
It would depend on what your condition is, but if you want it to count seconds specifically it has to have a wait 60 frames like Foxnixed posted because that command will run 60 times a second without the wait.
As is, this is a timer for 10 frames or 10/60ths of a second.
Does this have any way of rendering the timer onscreen?
you image checks if its > (higher) than 0 min, 0 sec which is always true.
a variable timer require image to see it (unless you want it invisible).
also you dont have a wait frame of 60 (1 second per time), as 10 seconds
is a wait of 600 frames in total.
a variable timer require image to see it (unless you want it invisible).
also you dont have a wait frame of 60 (1 second per time), as 10 seconds
is a wait of 600 frames in total.
You need some kind of HUD that displays a variable for that
Still totally confused. The suggestions don't use the timer command at all, which make me wonder why it exists. I tried both operands to trigger the event at 0:00. One of them hangs at 0:09 and the other never appears.
you need to check the timer < than 0min, 0 sec, not higher.
the default timer does count down, so you do something terrible wrong.
the default timer does count down, so you do something terrible wrong.
Thanks!
thanks everyone
Erase event will temporarily remove it from the map while you're on it but it will respawn if you leave and come back, i.e. run the timer again. You could tell it to turn on self switch A after it's done and have a new blank event page with the self switch A box checked.
Original thread: https://forums.rpgmakerweb.com/threads/timer-doesnt-count-down.156918/