Events interacting with each other

Hi! I've been searching forever for a way to solve my problem, but seeing I cant find a way I've decided to post my problem.

My problem in question is with interactions between events. But not common events (meaning in my case checking for collisions between coordinates wouldnt work). I am currently working with YEP_EventSpawner. In my game there are enemies (not spawned, just copied over and over) that approach the player, and the player has a weapon that creates a barrier in the floor that pushes the enemies away (modifying the movement route). The barrier itself is a spawned object, and when anyone touches it three times it fades away. My current problem is that i cant find a way to make the enemies interact with the barrier. I mean to have multiple barriers and multiple enemies touching them, but at this moment the only one who can interact is the player. The number of enemies and barries is why I said before that coordinate checking is out of the question.
I think that because the barrier is an spawned event, and there can be multiple ones with the same ID and template name the coordinates may result in multiple enemies being recognised as "colliding" even though only one of them is touching, and the number of enemies is rounding the hundreds. I dont think is impossible, but i really dont know how to optimise it so that i can apply it to every enemy

Does anyone know of a plugin or a way of solving it?
they are not the same ID. they get a available ID when spawned.
Set current event Id to a variable with event script: $gameVariables.setValue(1, Number(this._eventId));

Variable 1 will now hold the ID of this event. And therefore you can manipulate in more ways. I.e calculate distance between ID instead of x y pos.
Check out EventDetectPlayerPosition plugin it can help with event VS event position.
Moved to: Javascript/Plugin Support
Thanks for answering! (and sorry for posting in the wrong Thread)
But i have a few doubts:
Variable 1 will now hold the ID of this event
I may be asking a silly question, but Im using the SuperTools Engine to check for the Variable's value but it doesn't show up there? How can I check it?
calculate distance between ID
I haven't heard of ID checking. How would you check the distance between events with just the ID's?

Thanks btw for the plugin. Haven't tried it yet but I'll try to exploit it as much as I can 🙂

Edit: After trying it for a bit I've come to realise that I dont know what to insert in this instruction
(this.eventVsEventDistance(distance, event1, event2) ): Should I insert the Id, the name?? Neither have worked for me ( maybe its my fault, I'm using the script in a conditional branch)
$gameMap.distance($gameMap.event(1).x, $gameMap.event(1).y, $gameMap.event(2).x, $gameMap.event(2).y)

replacing 1 and 2 with the id of your two events.
If you try ID 003 it wont work, try ID 3 (without zero's)
this.eventVsEventDistance(0,Number(this._eventId),$gameVariables[41]) === true

Would this phrasing be correct? I'm trying to use this (Number(this._eventId)) because each spawned barrier is going to have a different ID. The variable 41 is holding the value of the enemie ID by using the call that it was suggested previously ($gameVariables.setValue(1, Number(this._eventId)); )

Furthermore I'm getting an error when trying to check the variable containing the ID with the SuperTools Engine Plugin:

TypeError: Cannot set property 'value' of null
at Game_Variables.setValue (SRD_SuperToolsEngine.js:3048)
at Game_Interpreter.operateVariable (rpg_objects.js:9567)
at Game_Interpreter.command122 (YEP_CoreEngine.js:1841)
at Game_Interpreter.executeCommand (rpg_objects.js:8930)
at Game_Interpreter.update (rpg_objects.js:8838)
at Game_Event.updateParallel (rpg_objects.js:8748)
at Game_Event.update (rpg_objects.js:8740)
at Game_Event.update (YEP_EventChasePlayer.js:226)
at Game_Map.updateEvents (YEP_CoreEngine.js:1667)
at Game_Map.update (rpg_objects.js:6025)

Original thread: https://forums.rpgmakerweb.com/threads/events-interacting-with-each-other.116767/