[SOLVED] How to detect that the player is next to the event?

Before anything else, I KNOW I can just make the event be activated by a player touch, but I want the event to be able to do two things at once, so that doesn't work for me.

So far I made this:
PlxMAYK.png


So I made it that the event gets activated when player and an event are on the same tile, but I cant figure out how to make it that it gets activated when they are NEXT to each other. Any ideas?
To calculate distance between player and event simply do substraction:

if x - ex >= 2 && y - ey >= 2 then
battle processing: bat*2
end

if you don't know how to operate script in conditional branch, then I make you proper event call. This is just an idea above.
So if difference between player x and event x is greater or egual 2 and difference between player y and event y is also greater or equal 2 then start battle, but why to make yourself work difficult since you can get Event Proximity Activate Plugin?
Oh, yeah, that plugin actually solves the problem, haha.
Thanks.

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/solved-how-to-detect-that-the-player-is-next-to-the-event.115655/