Changing events occur based on side of approaching RPGMV

ok so i just finish watching some youtube tutorials but by far noone answer this question
how to make different event occur on touch depending on the side of the object you currently are.
for example
i want to create two NPC's talking to each other and if you approach one from behind he did't notice you and continue on conversation.
but if you approach her/him from the side NPC will cut the chat and turn to me asking "what you lookin at?"
if i create event on NPC's he will turn to me no matter from where i approach.
did i need to create NPC as unmovable object like chest in certain position? and add 4 different events around this object?
is there a way to add this as one event without spamming 1000 events in every map?
olso if there's no wayand i must stick to spamming events how to make them occur only if NPC or NPC;s as object are around?
example 1.png
Moved to: MV Support

You need to check the Direction Fix box on your event.
Then you can use Control Variables to get the event's direction in one, and the player's direction in another.
Then Conditional Branch to determine if the variables are equal - if they are, it means you approached him from behind; if they aren't, it means you approached him from the side.
When you want the event to turn, use a Move Route to turn Direction Fix OFF, then Turn Toward Player. After the conversation, you can optionally use another move route to make it face the original direction, and turn Direction Fix ON again.
Moved to: MV Support

You need to check the Direction Fix box on your event.
Then you can use Control Variables to get the event's direction in one, and the player's direction in another.
Then Conditional Branch to determine if the variables are equal - if they are, it means you approached him from behind; if they aren't, it means you approached him from the side.
When you want the event to turn, use a Move Route to turn Direction Fix OFF, then Turn Toward Player. After the conversation, you can optionally use another move route to make it face the original direction, and turn Direction Fix ON again.
Assuming the NPC is facing a certain way and never turns, you don't even need to check the event's direction, you can just check the player's direction against specific values: 2 for down (meaning you approached from the top), 4 for left (approached from right), 6 for right (left), 8 for up (below).

Original thread: https://forums.rpgmakerweb.com/threads/changing-events-occur-based-on-side-of-approaching-rpgmv.143585/