Having a bit of trouble creating an event where, if you approach an NPC face-to-face, they talk normally, but if you approach them from the side or behind, you pickpocket them.
The way I thought to set it up was to have a bunch of conditional branches to check that the NPC and player are facing the same direction - so if the NPC is facing down, check if the player is facing up, do X. Else, do Y. Then check if the NPC is facing up, and again that the player is facing down, and so on. I made a similar multi-check event before with a bunch of nested conditionals in this way (though for that it was checking for switches) so this SHOULD work, even if it looks a bit messy.
The problem is, when you interact with the NPC, of course he turns to face the player...so it'll always see that the NPC and player are facing the same direction. Of course this could be fixed by turning direction fix on, but I want the NPC to be able to walk around normally until the player interacts with them, THEN have it check if they're facing the same direction before deciding the action.
What's the best way to go about this? I tried a few different things with move routes and self-switches but I couldn't get anything to work the way I want it to. Ex. I can't have the first action be a move route with direction fix, because the NPC will already be facing the player just by talking to them. I would like the NPC to be able to move around normally with autonomous movement (which means setting the event to direction fix won't work) but when you interact it should check that they're facing the same direction. I can't think of a way to do that without the event being set to direction fix by default...but then I can't get the NPC to move and walk around like a normal person.
Is this possible and I'm just missing something, or is there no way to do this without just making the NPC static so you always know what direction they'll be facing when the player approaches?
The way I thought to set it up was to have a bunch of conditional branches to check that the NPC and player are facing the same direction - so if the NPC is facing down, check if the player is facing up, do X. Else, do Y. Then check if the NPC is facing up, and again that the player is facing down, and so on. I made a similar multi-check event before with a bunch of nested conditionals in this way (though for that it was checking for switches) so this SHOULD work, even if it looks a bit messy.
The problem is, when you interact with the NPC, of course he turns to face the player...so it'll always see that the NPC and player are facing the same direction. Of course this could be fixed by turning direction fix on, but I want the NPC to be able to walk around normally until the player interacts with them, THEN have it check if they're facing the same direction before deciding the action.
What's the best way to go about this? I tried a few different things with move routes and self-switches but I couldn't get anything to work the way I want it to. Ex. I can't have the first action be a move route with direction fix, because the NPC will already be facing the player just by talking to them. I would like the NPC to be able to move around normally with autonomous movement (which means setting the event to direction fix won't work) but when you interact it should check that they're facing the same direction. I can't think of a way to do that without the event being set to direction fix by default...but then I can't get the NPC to move and walk around like a normal person.
Is this possible and I'm just missing something, or is there no way to do this without just making the NPC static so you always know what direction they'll be facing when the player approaches?