Crumbling floor that player has to run from

I'm trying to make an event in which the player steps on an (seemingly harmless) tile and the floor begins to crack from behind the player and the player has to sprint to the end of the room to avoid falling into the continuously-growing hole behind them and getting a game over. How do I do this?? Or, alternatively, how do I make it so the player can move while the maps are changing instead of waiting for the change to process every time?
Hy, i did something similar, the floor cracks and you fall down when you enter 2 times the same space, you can find it here: https://forums.rpgmakerweb.com/index.php?threads/demo-town.141882/

to make the tile crack and break is actually easy, the hard part or rather tedious would be to ask where the player is and if he is on a broken floor, to make it go game over. At least i dont see any other way how that would be possible but its absolutely doable with a few variable and maybe switches...
You may be able to handle finding if the player is on broken floor using self-switches. I think the way I'd go about tackling this--and mind you, this is theoretical, I haven't tested it--is something like the following:

Each floor tile is an event with three pages.
Page 1 is set to Player Touch, and turns on Self-Switch A.
Page 2 is Parallel Process when Self-Switch A is on, plays the animation of the floor tile cracking and turning to an empty space (or dark abyss, or or spike trap, or whatever awaits below) and then turns on Self-Switch B.
Page 3 is Player Touch if Self-Switch B is on, plays any animations or sound effects you want associated with falling into the pit, and calls the Game Over.

Potential pitfall (pun completely intended) of this method is the number of parallel processes you could potentially have running (I would not make this a very big hallway) and if it would cause the game to lag or not.

Another, possibly bigger, problem would be that you would have to jump through some hoops to reset the hallway when the player left, it they needed to pass through that area again--possibly by adding a switch like 'Reset Trap" to the door on the other end, and adding a check at the end of Event Page 3 for "if Reset Trap is ON, Self-Switch A off, Self-Switch B off."

There's probably a more elegant way to handle it, but those are my thoughts!
You may be able to handle finding if the player is on broken floor using self-switches. I think the way I'd go about tackling this--and mind you, this is theoretical, I haven't tested it--is something like the following:

Each floor tile is an event with three pages.
Page 1 is set to Player Touch, and turns on Self-Switch A.
Page 2 is Parallel Process when Self-Switch A is on, plays the animation of the floor tile cracking and turning to an empty space (or dark abyss, or or spike trap, or whatever awaits below) and then turns on Self-Switch B.
Page 3 is Player Touch if Self-Switch B is on, plays any animations or sound effects you want associated with falling into the pit, and calls the Game Over.

Potential pitfall (pun completely intended) of this method is the number of parallel processes you could potentially have running (I would not make this a very big hallway) and if it would cause the game to lag or not.

Another, possibly bigger, problem would be that you would have to jump through some hoops to reset the hallway when the player left, it they needed to pass through that area again--possibly by adding a switch like 'Reset Trap" to the door on the other end, and adding a check at the end of Event Page 3 for "if Reset Trap is ON, Self-Switch A off, Self-Switch B off."

There's probably a more elegant way to handle it, but those are my thoughts!
the problem with that is, if you stay on the plate when it turns to page 3 (self switch B ON) then it wont activate, since you have to move away and back, only then it will work.
AS you can see in the picture:
1645816066570.png

If i walk away and go back then it will activate but as long as i stand there, it wont do anything.
1645816142572.png


And if you leave the 3rd page in parallel then it will just run the event, doesnt matter where you stand.^^


EDIT: rn i got some things to do but i will gladly make such an event later when the kids are sleeping, i could use it for my next demo house as well...
I'd use control variables to get the player's MAP X and MAP Y and then check those versus the fixed coordinates and 'status' of the crumbling floor, i.e. if the player is on a crumbling tile based on their X & Y coords AND that tile has crumbled (say its crumbling variable is set to two) then execute code to fall down/game over/whatever you want

I realize this might not be helpful w/o a detailed explanation of the implementation, but I'll let the others take a crack at it first
I'm trying to make an event in which the player steps on an (seemingly harmless) tile and the floor begins to crack from behind the player and the player has to sprint to the end of the room to avoid falling into the continuously-growing hole behind them and getting a game over. How do I do this?? Or, alternatively, how do I make it so the player can move while the maps are changing instead of waiting for the change to process every time?
So, sry but i had no time last night to do it, friends came over and stayed till late into the night, kids sleeping rn so i had some time at hand. 😀
Here are the events:
1st the breaking tiles:
1645893578604.png

Its a little tedious to set them up since you have to copy + paste them AND change the variable in each one but i did 24 of them and it took me less then 5 min, so its not that big of a deal except you got 500+ ^^
First page is self explainatory, it just switches SS A on to get it going, 2nd page is just to show the crack and 3rd page is the one, you got 20 frames to move on or the conditional branch in p3 will seit in, killing you or whatever you like, i did it with a text message because going to game over every time while testing is obnoxious.^^
page 4 is just to reset them, you can reset them all with turning the switch ON, as long as they are on the same map, they will reset.

You also need this event on the same map:
1645893807044.png


and something like this for reseting:
1645893852214.png



And here how it looks:



Ofc you can finetune it, also add some SEs and tweak the time...
Other then that, it works fine. And a little side tipp, only copy + paste them once youre 100% sure the event is done and all you have to do is change the xy variable because i had to add a reset function after applying them and even if it was just copypaste eventpage, it still was tedious. 😀
Also if you know how to work with gimp or photoshop you can use the dmg chars:
1645894231868.png

and make a few of them gradually smaller, then change the picture via moveroute also maybe rotating them at some degree... ect giving the illusion that they fall in... maybe il do it some time but rn im too lazy since my gimp skills are at amateur leves, for the simplest things i need years to finish... ^^

EDIT: did it anyway, im sure it can look much better but this is something that i had in mind:

Original thread: https://forums.rpgmakerweb.com/threads/crumbling-floor-that-player-has-to-run-from.145240/