Getting my spike traps to work right

Hi folks. I am currently working on a horror game in RPG Maker MV. I have a bunch of spike traps in a chamber that are constantly going up and down, triggered by a parallel process event on the map.

I have it set up so that the player can walk over the spike area when the spikes are down, but kill the player when they are up. I have it set up on the second page of the spike event (when the spike is up), that a player touch will kill the player. This works well when you run into the spikes when they are up.

My problem is that when the spikes raise while you are already standing on them, nothing happens. It doesn't detect the collision, even when switching the trigger method to event touch. Is there a way to make this work?
I'm just going to drop this here for you friend:
YEP Region Events
Hi folks. I am currently working on a horror game in RPG Maker MV. I have a bunch of spike traps in a chamber that are constantly going up and down, triggered by a parallel process event on the map.

I have it set up so that the player can walk over the spike area when the spikes are down, but kill the player when they are up. I have it set up on the second page of the spike event (when the spike is up), that a player touch will kill the player. This works well when you run into the spikes when they are up.

My problem is that when the spikes raise while you are already standing on them, nothing happens. It doesn't detect the collision, even when switching the trigger method to event touch. Is there a way to make this work?
The easiest way to do this is using regions I think. You can make it in that parallel process. Make a conditional branch: if switch spike = ON, then check region under player. Draw region X on the spike events, then if player's region = X, do the same that happens when you touch the spikes.
I'm just going to drop this here for you friend:
YEP Region Events
Thank you for the reply. I guess that I should have mentioned that I have tried to use YEP Region Events for this, since I have been using it to create my character's footstep sounds, but since it also just checks the initial step onto the region tile, it didn't kill the player if you were already standing on the spike trap and it activates.
Which brings me to:

The easiest way to do this is using regions I think. You can make it in that parallel process. Make a conditional branch: if switch spike = ON, then check region under player. Draw region X on the spike events, then if player's region = X, do the same that happens when you touch the spikes.
This seems like a good solution, but I can't seem to find a way to check the region that the character is standing on - on demand - only on the original step, since the conditional branch conditions have no command for checking the current region, and I can't seem to find the RegionID in variables. Yanfly's Region Events also does not have any plugin commands to check regions on demand, just an option to change the default behavior when you step onto a region.

I'm sure I'm missing something, and I apologize. Thank you both for your help, though.

EDIT:
Sorry, I found how to access RegionID using Get Location Info. I am about to try it out. Thank you again.

EDIT2:
@fizzly, your method worked out great! Thank you for that. This problem has been giving me headaches for days, and your solution was plain and simple. I feel like a bit of a dunce right now for not seeing that earlier.
Thanks again!
This seems like a good solution, but I can't seem to find a way to check the region that the character is standing on - on demand - only on the original step, since the conditional branch conditions have no command for checking the current region, and I can't seem to find the RegionID in variables. Yanfly's Region Events also does not have any plugin commands to check regions on demand, just an option to change the default behavior when you step onto a region.

I'm sure I'm missing something, and I apologize. Thank you both for your help, though.
It's more tricky to find, but it's on page 3, called "Get location info". Select player coords, region ID and select variable to store it. Then make conditional branch to check is that variable = X 🙂
Yes, I eventually found it, and made an edit to my reply to you. It works great, and the problem I've had for the last two days is now very much solved. Thank you!
Glad I could help! Best of luck.
You can do this with just a conditional branch actually

Conditional Branch > Script > type in "$gamePlayer.regionId() === x "
(x being whatever region ID you assigned for your spikes tile)

I prefer not to store such data in variables since you can easily access it with a script call, but whatever works for you 🙂
You can do this with just a conditional branch actually

Conditional Branch > Script > type in "$gamePlayer.regionId() === x "
(x being whatever region ID you assigned for your spikes tile)

I prefer not to store such data in variables since you can easily access it with a script call, but whatever works for you 🙂
Well, I definitely had no idea that option even existed. Good to know!

Original thread: https://forums.rpgmakerweb.com/threads/getting-my-spike-traps-to-work-right.155435/