Event interaction with an item

Hello! So today I am asking for assistance to understand the cleanest and most efficient way to effect an event with an item. Multiple events of the same kind, on various maps. There will be a LOT in my game so I was trying to find something easier than constantly checking player location compared to each event's location.

Example: I am using Galv's tool plugin already to run common events on tool use and have a little UI for it. So right now when player presses ALT it uses an item or tool. For this example an axe.

There are many trees on various maps and I want it so that when I use the axe item it chops down the tree. For this I used to have the events themselves contain parallel processes that when player is above the event and facing down, to the left of the event and facing right, etc, it will check if player uses an item. This was with mogs chrono engine and ABS system. I've since removed it due to multiple bugs it caused.

I was also very worried that having too many events on a map with parallel processes constantly checking the player's location would lag later on. If this is not the case, great! But something tells me it is as I've seen others report too many of these processes causes lag.

What I'm trying to do now:

I need the events to not all be checking and running 24/7 if possible. Instead I want the common event I run to check for the event the player is facing, and effect that event. So when player faces a tree and presses the button to activate the axe item common event, it will trigger that tree and only that tree to be chopped down.
Could you not just have the tree event check with a condition branch whether or not the player had an axe in their inventory and when the action button is pressed chop down the tree?
I might not be understanding what you are asking @_@
There are two different directions from where to approach this.
One of them is to use code in the event - this would mean that the event needs to be set to action button and check whatever is needed.

The other way is to check what is on the map.
you need to use two variables and control variable as well as conditional branches to check which XY position is in front of the player.
Then use get locaton info to return what is on that position - for example if there is an event, get location info can give you the event id.
then react and change that event.

Both ways have their own advantages and disadvantages.
I'm a coding noob haha. I have no idea how to do that.

I'm not quite sure how to get the event ID. If I could do get the event ID from each event the player faces, and then effect that event from a common event using yanfly's selfswitches and variables, that would be ideal.

So basically the variables are always set to player x and y, and more variables change depending on which direction the player is facing? Like conditional branches for if the player is facing left, -1 X or something similar for all directions. Then with those variables somehow check what event is at that location and when using an item it checks what event the player is looking at? I really am a noob at getting event info for interactions. Thats the issue I have right now.

If it helps I'm using yanfly's self switches and variables, as well as the event morpher, copier, and spawner.
yes exactly - what you're missing here is that "get location info" is a specific event command available that can get you different data about a map location, including the ID number of the event there (if any).

Original thread: https://forums.rpgmakerweb.com/threads/event-interaction-with-an-item.105428/