how to implement a death timer with an escape sequence?

I want to implement a section where the player needs to run to an exit through different maps while a timer ticks down until where the building collapses and therefore killing the player (well not really killing, just taking them back to the hub with some fancy effects). problem is? I can't get it to check for this timer.
if I do it like so,
[ISPOILER]
2023-05-11 18_07_44-ID_001 - Event Editor.png
[/ISPOILER]

then once the timer hits 0, nothing happens. I read up on this issue, and I added a loop function in an attempt to fix it, like so:

[ISPOILER]
2023-05-11 18_15_39-ID_001 - Event Editor.png
[/ISPOILER]
It works! Great! what's the problem then? The player can't move, which as you can imagine isn't ideal for an escape sequence. please rpgmaker pros, teach me on how I should go about making the death timer work with the player still being able to run away towards the exit. as information out of the gate, yes, the escape spans over multiple maps, and yes, it is important that it is on different maps with how the level is structured.

edit: please disregard the exact values. they are just placeholders.
From what little I can see in the screenshot, there's no need for a loop. Just put a wait equivalent to 10 seconds after starting the timer.

The player can move if you put the event on "Parallel" and not autorun.

The reason you came across the "loop fix" is because your event otherwise immediatly check if the timer is zero after starting it. This is of course not true, so nothing ever happens.
From what little I can see in the screenshot, there's no need for a loop. Just put a wait equivalent to 10 seconds after starting the timer.

The player can move if you put the event on "Parallel" and not autorun.

The reason you came across the "loop fix" is because your event otherwise immediatly check if the timer is zero after starting it. This is of course not true, so nothing ever happens.
the problem with that is that the "wait" function only goes up to 999 frames (16.65 second) while the timer is meant to be about 1.5 to 2 minutes in length. probably should have mentioned that those values are just placeholders.
I'm going to put the suggestion out there that you take a mini-break from making your own game to do some more tutorials on MV's basic event functionality. I only suggest this because you have some mistakes that indicate misunderstandings, like using Autoplay for this and putting a loop inside of an Autoplay or Parallel event.

That said...
the problem with that is that the "wait" function only goes up to 999 frames (16.65 second) while the timer is meant to be about 1.5 to 2 minutes in length.
So you put multiple wait commands in a row.

The typical, correct way to do this (especially since you say the escape can span multiple maps) is to use one event to set and activate the timer and a separate parallel process to check for it to be 0 and do whatever.

There are kind of a bunch of threads about this (and probably YouTube tutorials) but as a quick example:
Screenshot 2023-05-11 125754.pngScreenshot 2023-05-11 125925.png

And you could certainly outsource the second one to a parallel common event, but if you want it to interact with the character/events on the map at all, you'd make it a map event and just copy and paste it onto each of the maps you go through on your escape route.
You can also use a script call if you are like me and don't like stacking wait commands:
Code:
this.wait(frames);
As others have said, you can use a Parallel event to periodically check the timer and react accordingly.

I would not recommend stacking wait commands in this situation. E.g. consider a Parallel common event like this:

◆Wait:120 frames ◆Text:None, None, Window, Bottom : :Hello!
You can delay the message indefinitely by simply not spending 120 consecutive frames on the same map. If you go to another map, the event is reloaded and its wait time restarts from scratch. (Only Parallel events behave like this: the other triggers all process through the main interpreter, which persists on map change.)

If you want the time displayed, the built-in Timer is definitely the simplest option. An alternative could be to use a variable, e.g.
Spoiler: example event setup
  • Start (probably a map event):

    ◆Comment:500 = 50 seconds * 10 checks per second. : :Engine runs at 60 frames per second, so: : :10 checks/second => wait 6 frames between checks. ◆Control Variables:#0001 Timer = 500 ◆Control Switches:#0001 Run Away! = ON
  • Check (Parallel common event bound to "Run Away!" switch):

    ◆Wait:6 frames ◆Control Variables:#0001 Timer -= 1 ◆If:Timer ≤ 0 ◆Text:None, None, Window, Bottom : :Kaboom! ◆Control Switches:#0001 Run Away! = OFF ◆ :End
Hello everyone who tried to help, sorry for going MIA for a while there, had some stuff to sort out, the parallel event thingy worked, along with some additional bits and bobs from steam guides, and though a more refined system for the checking would have worked better, eh, it more or less does what I want so I'm ok with it. thanks for the help.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-implement-a-death-timer-with-an-escape-sequence.157434/