I'm trying to figure out the best way to detect whether a NPC (one that never walks) is inside a trigger zone or not. (Sometimes that NPC will be teleport to other rooms so handling his position with variables would be more complicated.)
The setup: The player needs to pick up an object from a room, but only if the NPC is not in that room. I want to use a trigger placed inside the room to determine the NPC's presence.
What I understand so far: I know the logic I want to implement — I just need to set a variable based on whether the NPC is inside the trigger or not, and then check that variable before allowing the pickup action.
My question: Since the NPC doesn't walk, I can't rely on OnEnter/OnExit events firing during gameplay. I need to actively check the NPC's state at the moment the player tries to interact with the object.
I guess I need to use the action Object->Send Message to the trigger->Interact... BUT... should I use two separate trigger components — one for "NPC inside" and one for "NPC outside" — and call each independently?
Is there a cleaner way to handle this with a single trigger?
Any guidance would be greatly appreciated!
It looks like you're new here. If you want to get involved, click one of these buttons!