Have an NPC respond differently depending on direction player interacts. RPG Maker MZ.

Hello,

I am working on a condition I want to implement in my game where NPCs and other events react differently if the player were to interact with the NPC, or any event, from via North,South, West, and East. Is there a way to do this? I am assuming some scripting will be involved which I don't mind.
Example:
An object is being destroyed differently depending on the direction the player interacts with it. Or an NPC will say something differently when interaction(with action button) from behind them. The first scenario is my main one.

I can handle all the animation, I just need help with establishing the variable/condition that would trigger the different response.

Any help would be appreciated.
Sounds like a basic if condition. "If player is facing Up, Down, Left, Right."
Can you give me an example? I can't find it in the even menu anywhere but I am sure I am overlooking it.

Edit: Nvm I found it! It was in conditional branch>page 3> character> player> facing down

Thank you! Thread can be closed.
I do this quite a bit in my games, especially for searching and vendors. Set up a conditional branch (page 3 > Character):

1663637367547.png


Set up the four directions and what you want said/done in each branch (see below). Just remember that these are based off the direction the player is facing... so... Player Facing Down is actually BEHIND the NPC in this case.

1663637313774.png
Thread can be closed.
If you want your thread to be closed simply report it to the mods with the "Report" button. As a reason you can give something like "thread is solved, please close".

Original thread: https://forums.rpgmakerweb.com/threads/have-an-npc-respond-differently-depending-on-direction-player-interacts-rpg-maker-mz.151415/