Event touch Player not working when the event "Spawns" on top of the player

Greeting all RPG Makers.

I need some assistance. I've created a dungeon where the gimmick is electricity that will shock the player when touched. The electricity events are set to Event Touch, which works perfectly when the player walks on the event, but if the player was originally on the event's spot, and the electricity appears, it won't trigger.

Below is an example of what I am saying:


I want it to trigger if the player is on the spot while the electricity spawns. Is there any way to fix this? Am I missing something? Do I need a plugin? Sorry for the inconvenience.
Instead of a video, please post screenshots of the events. Are they set to Event Touch for the trigger?
Yes. I did. Here is the electricity
1681226711533.png


Here's also the Parallel process happening in the dungeon.
1681226854697.png



I posted a video just in case you did not understand what I was saying.
This is how RM mechanics are constructed. Someone once had a similar problem with trap spikes that retract and extend. The easiest way to get around this is to draw an X region where the laser appears, then when laser = ON check the player's position region ID. If he is standing on this region, then strike him.
This is how RM mechanics are constructed. Someone once had a similar problem with trap spikes that retract and extend. The easiest way to get around this is to draw an X region where the laser appears, then when laser = ON check the player's position region ID. If he is standing on this region, then strike him.
I see, I see. In my honest opinion, these "RM mechanics" are a bit... dull. Then again, this is RPG Maker, not Precise Platformer Maker.

So I will designate the region as 5. How would I script this now? "If player is on region 5, then"
1681229089639.png
To clarify Fizzly's point,
Use a region instead of events. Paint a region where the electricity comes out, let's use region 5 of this example.
Paint region 5 anywhere the electricity will appear.
Next, create a parallel event.
Have the parallel event check the players X & Y coordinates so that we can determine if the player is standing in the proper region.
Use the "Get Game Data: Region" command and assign the game data to a variable. You will need to use your previously used player X & Y in order to determine this data.
Now you can create a conditional branch:
If player region is 5
If switch:ZapPlayer is ON:
Do the damage stuff

and at the bottom add a new conditional for controlling the switch:
if switch:ZapPlayer is ON:
Turn it OFF
Stop sparky animations
else
Turn it ON
Play sparky animations

finally:
wait 60 frames (or however long you want between

May want to double check the logic and play test it. Considering I'm not looking at RM (and it's also not problem solving for my own game 😅) it may not be the most well-thought out. Give it a test and adjust as necessary.

edit:
changed the example region to the one you used in your screen shot
also
*Region ID and player X&Y is pretty important, so it might be worth moving that portion of the parallel event into it's own independent parallel event/common event, you will likely need it again for other puzzles and traps. This example event only checks the player XY once every second, which might be a bit slow for other cases. You'd likely want it to check the player's location once every 3-4 frames.
Ok, I read a little tutorial on "Get location info" and I got it to work! Thanks everyone!
This example event only checks the player XY once every second, which might be a bit slow for other cases. You'd likely want it to check the player's location once every 3-4 frames.
I made it so that as soon as SHOCK is on, it checks the player location and region ONCE, so if you were originally on the path of being shocked
when the lightning strikes, you will be hit.
You can use this script by Bex and put it in a parallel process that checks once every five frames or so. Adjust the hit distance to how big or small you want the detection radius to be. Change event 1 to -1 for the player. If you want it to activate with only certain events, put another if statement to check for that.

"The following Scriptline Code checks if Event1 is ontop of event id 2 to 100."

Just change the last line to whatever you want to happen, e.g. player takes damage
Next, create a parallel event.
Have the parallel event check the players X & Y coordinates so that we can determine if the player is standing in the proper region.
...
You'd likely want it to check the player's location once every 3-4 frames.

I made it so that as soon as SHOCK is on, it checks the player location and region ONCE, so if you were originally on the path of being shocked when the lightning strikes, you will be hit.
Yeah - to offer my two cents, I wouldn't make a separate parallel event at all.

Put that code into the event that turns on the switch. It turns on the switch, which activates the map events, and does one initial check to see if the player is already standing there.

From that point on, the code in the events will take over if the player moves into them. I don't see a benefit to having another event involved.

But what TheAM-Dol described as the process with the event commands is all exactly right.

Original thread: https://forums.rpgmakerweb.com/threads/event-touch-player-not-working-when-the-event-spawns-on-top-of-the-player.156582/