Is there a way to check whether an event is touching the player?

I'm making a game with overworld enemies. They have line of sight so they chase you when they see you, but after they don't see you for a while they get bored and switch their pathing. There are also sometimes more than one enemy per room. For this I'm using two plugins, Proximity Sensor and Smart Pathfinding, but the way I'm doing this necessitates that the event be a parallel event. However I'm running into an issue, as I need to check if the event is touching the player and I'm not seeing any option for that. I cannot turn the event into a on touch event either, I need the logic that's currently present.

Is there a way to do this? With or without plugins or scripting, I don't mind. I'm certain you can do it with variables but I am not seeing how right now. Below I attach the screenshots of how the enemy is set up currently.

1769736594284.png

1769736624115.png


Currently the goal would be to verify if the player is touching the event and if so, flick another self switch where I could handle battle.
You could put your second page on event touch and control the data for all enemies' "patience" from one parallel event. Also, if you get a self variable plugin, it makes it easier.

In the parallel event, for enemy events check forEach to check self-switch ON, add +1 to the patience self variable, if that reaches 180 set it to 0, clear the target and turn self-switch OFF. You can give the setTarget command with a parallel middle page (from first page to a page that uses setTarget and from there immediately to your current second page). EDIT: and have the battle processing on that page
Thanks for the help! I did end up making it a different parallel event. I think my skill or understanding of English is a bit lacking cause I didn't understand all your reccomendations,,, but I figured out another way to do it. It's a bit of a hackjob but since im only gonna have max 3 enemies on screen at a time this works.

On the proximity sensor aside from a selfswitch i also flick another switch that indicates its on aggro. the page activated with the selfswitch is now an event touch. the regular switch enables a parallel event which keeps track of everything for that one enemy and once the patience expires i use a script to switch the event's self switch off. and then if the event touches the player it flicks another self switch and starts a battle.

only real bad thing is i cannot make it a common event since i need to edit each enemy and map id (maybe? idk how at least) but i need to edit the ID per enemy anyway so it's fine. IDK if i'd reccomend it to someone with a bigger project but it works for me

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/is-there-a-way-to-check-whether-an-event-is-touching-the-player.182195/