Trouble with giving a time limit.

So, I have a scene where you rescue some people from a burning building, and when they leave, the roof starts collapsing. I want to make it, so you have 5 seconds to leave the building before the roof caves in and kills you. How would I go about adding that timer? I tried using the wait command on a parallel that would then switch to a self switch that would play the death scene, but that didn't work.

Here's screenshots of the event pages:
Pantheon - RPG Maker MV 11_14_2023 3_44_32 PM.png
Pantheon - RPG Maker MV 11_14_2023 3_44_41 PM.png
Your pages are backward. Events always play the highest number page that fulfills its conditions.
Are you positive that switch 43 is turned on? Aside from that, the parallel event will only run for as long as the player is on the same map, so if your burning house has the player travel to another map, your timer is ruined/reset whenever the player leaves the initial map, and of course what Turan said, because of course he was gonna ninja me.
Your pages are backward. Events always play the highest number page that fulfills its conditions.
Oh! I forgot about that lol! Thanks!

Original thread: https://forums.rpgmakerweb.com/threads/trouble-with-giving-a-time-limit.162941/