Timer issues

Inkarana

Villager
Member
Joined
Apr 26, 2020
Messages
5
Reaction score
2
First Language
German
Primarily Uses
RMVXA
Hello people,
so I tried to use a timer and if it runs out, it should trigger a game over - but it doesn't.
It starts its countdown, but when the timer reaches zero, nothing happens. Switch 27 works just fine, even when the timer reached 0:00.
Can you please help me? Thanks in advance!


Timer 1.png
Timer 2.png
 

Mhin Ra

Veteran
Veteran
Joined
Aug 17, 2015
Messages
61
Reaction score
18
First Language
English
Primarily Uses
RMVXA
I've never used the Control Timer before, but looking at the code (and doing some brief experiments), I think all that happens on a control timer ending is that the current battle is aborted... which doesn't seem like what you want.

I think you can probably get what you need with a Timing -> Wait (1200). (1200 = 20 seconds * 60 frames\sec) If the UI refuses to allow more than 999 (which, IIRC, it does) you can either do two wait(600) right after one another or use a script like this:

1200.times { Fiber.yield }

which is all that the wait command in the UI actually does.

As a side note: your first page is Autorun, which means it will block user interactions while it's active (which it will be for the entire duration of the wait). If what you intend is to let the player run around and do stuff while the timer is active, then you probably want to make the page with the big wait parallel as well. I think parallel events do not tick while the message window is up (FWIW), but you probably don't want to put up any text boxes while the player is in a timed event anyway.

Hope that helps!
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,649
Reaction score
13,263
First Language
English
Primarily Uses
RMMV
What's on page 5?

As soon as you set the timer, page 4 will be active. It will do the check to see if the timer has reached 0 (which it won't have), so will turn on switch 27. If page 5 is conditioned by switch 27, that will immediately become active, and your checking will stop.
 

Inkarana

Villager
Member
Joined
Apr 26, 2020
Messages
5
Reaction score
2
First Language
German
Primarily Uses
RMVXA
Sorry for replying late and thank you so much for your answers!
Apparently, the self switch didn't work the way it should. The game over triggered after I used a regular switch instead of a self switch.
@Mhin Ra, thank you for explaining the auto run! I already kind of wondered why I couldn' move then :aswt:. Your idea using the wait command looks interesting as well, I think I will look into it!
@Shaz There's a conversation on page 5 five triggered by switch 27 which worked the way I wanted it to after I removed the self switch.
 

Mhin Ra

Veteran
Veteran
Joined
Aug 17, 2015
Messages
61
Reaction score
18
First Language
English
Primarily Uses
RMVXA
For what it's worth: self switches and regular switches should behave exactly the same in terms of how they trigger event pages (as well as how they are set\cleared), except of course, that you can only trigger with a single self switch whereas you can trigger on two regular switches.

If you're seeing them act differently, my guess would be that you might have another page that's unintentionally setting the self switch. Because self switches don't have meaningful names, I often find I accidentally use the same one twice when scripting an event ;)
 

Inkarana

Villager
Member
Joined
Apr 26, 2020
Messages
5
Reaction score
2
First Language
German
Primarily Uses
RMVXA
Thanks, I'll keep that in mind when I'll be working with a self switch again!
 

Users Who Are Viewing This Thread (Users: 0, Guests: 2)

Latest Threads

Latest Posts

Latest Profile Posts

Enjoying my weekend at home to stay Covid free. How is everyone else doing?
If you enjoy speed mapping for RPG Maker MV check out my YouTube Channel. My latest video includes custom made tiles which makes a simple map look dynamic!

Check out my short game Hikari's World! : Chapter I, on itch.io/games.
An actual dwarf with an actual axe is not so fascinating as the fantasy counterpart...
I'm so back and forth on pre-ording MZ. I can totally wait for a better deal down the road (since I don't need the extras and waiting to see how YEP plugins turn out) but there's something about the fun in playing with "a new toy".
:rheh:

Forum statistics

Threads
100,603
Messages
977,703
Members
132,210
Latest member
Rkyfat
Top