A way for events to recognize they are close to each other?

I want a monster system where you can see them walking around as events. However if two monsters are pretty close to each other, when one initiates the battle(in-built battle system), the other one will be in the battle at the same time.

I can't think of any easy way to do this besides the whole finding coordinates for each event and doing a ridiculous amount of work for every single event.

If anyone can think of an easy way to do this, this would help my game so much!
Thank you!
All I can suggest is a mixture of a plugin and a variable checking common event set to parralel.
This can calculate the distance betwen map events:
JavaScript:
$gameMap.distance($gamePlayer.x, $gamePlayer.y, $gameMap.event(1).x, $gameMap.event(1).y)
// calculates the distance betwen "Events" , or Event/Gampeplayer
// this example shows both Event(1) & Gampeplayer
// "$gamePlayer" can be replaced by "$gameMap.event(x)"

And you could use another Code to check/include all events on map:
JavaScript:
// this checks all GameMap Events
for (var i = 1; i <= $gameMap.events().length; i++) {
     var eventunit = $gameMap.event([i]);
     // add code here
};

Original thread: https://forums.rpgmakerweb.com/threads/a-way-for-events-to-recognize-they-are-close-to-each-other.130850/