I want to make an NPC turn toward the player unless the player faces them

So I tried to mess with this but I'm simply too new with figuring this kind of thing out, so I was hoping maybe someone could point me in the right direction!!

The idea is that the NPC will turn to face the player as they walk around, but I want them to look away if they're "caught" (if the player faces them). Then, when the player looks away again, the NPC would go back to watching.

It seems like it would be super easy but I can't quite get it to work right.

Any ideas..?
Thank you either way!!
Without plugins, you could probably create surrounding events near the NPC that will trigger and makes the NPC turn away if the player comes within a certain range (i.e: steps on the event itself).
Without plugins, you could probably create surrounding events near the NPC that will trigger and makes the NPC turn away if the player comes within a certain range (i.e: steps on the event itself).
The only problem with that is if I have the player step on the tile from the wrong direction, the NPC would still turn unless it does some sort of direction check (which I'm not entirely sure how to do).

I also think that would take up a lot of event tiles unless there's some way to make a really big one, haha.
Little update: The closest I've gotten was having the NPC change direction to follow the player but when I turned to face him he would rapidly turn back and forth instead of away. I did that by making a bunch of if statements though so I'd rather not do it that way if I can (and I already deleted that event).

If there's some way to do it with less steps/clutter (with switches or something) that would be ideal!

I'm also willing to use plugins if there's one that would help me, here.
I actually just realized that I also need the NPC to be ...talk-to-able. I'm not sure if this is possible unless it can be done through just the autonomous movement options?
I actually just realized that I also need the NPC to be ...talk-to-able. I'm not sure if this is possible unless it can be done through just the autonomous movement options?
You can have the proximity Event both make the NPC turn with "Set Movement Route" and open up a text box on the same page.

As for making them follow the player in general, make the NPC's movement "Custom" and add a "Turn Toward's Player" and set it on Repeat.

Alternatively, if you don't mind using Plugins, you'll need something that gives Events a "trigger radius" so they can occur at a distance.
You can have the proximity Event both make the NPC turn with "Set Movement Route" and open up a text box on the same page.

As for making them follow the player in general, make the NPC's movement "Custom" and add a "Turn Toward's Player" and set it on Repeat.

Alternatively, if you don't mind using Plugins, you'll need something that gives Events a "trigger radius" so they can occur at a distance.
Thank you for the suggestions! Unfortunately I don't think any of that will cover what I'm trying to do, since it isn't really proximity based so much as directional and conditional depending on how both of them are facing (player vs NPC).

I had already been playing around with the "turn towards player" and "turn away from player" movements but I'm trying to set it so that looking in his direction causes him to look away, but then he will look back again when the player turns.

I got close-ish but realized I made a mistake since the way I was doing it caused it to loop and the NPC would instead switch back and forth instead of facing away until the player turned again, so perhaps if I play around with it some more I can find a way to get around that now that I figured out what the problem was.

Regardless, I appreciate the help! Thank you!

Original thread: https://forums.rpgmakerweb.com/threads/i-want-to-make-an-npc-turn-toward-the-player-unless-the-player-faces-them.139969/