How best to handle NPC conversation zones active/inactive (Corgi)
Posted: Fri May 19, 2023 2:38 pm
Hi, I'm having an issue with getting NPCs to deactivate/be uninteractable at the end of a conversation, wondering what the best way to approach this is.
I have a few NPCs that once you've interacted with them, you shouldn't be able to interact with them again until the quest "Talk to X" becomes active again. At first I tried using SetActive() to switch off the conversation zone at the end of the conversation, but that was causing the player to get stuck in place (I guess because the player is still technically in the conversation).
Currently I'm using a variable on the dialogue system trigger (IsInteractable) which, if false, doesn't start the conversation. The problem is that the interactable prompts still show up, they just don't start a conversation when interacted with, which feels glitchy and clutters up the level.
I'm wondering if any of the following would work/which is best?
Option 1: In the conversation zone, there are Activation Conditions - can these be hooked up with Dialogue System variables at all? If so, the IsInteractable variable could be used here instead of the dialogue system trigger.
Option 2: Multiple dialogue system triggers, one that starts the conversation and one that deactivates the conversation zone on conversation end - not sure if this is possible or if it would glitch out.
Option 3: The Activable checkbox in the activation conditions - could this be turned on and off using the sequencer perhaps?
Alternatively maybe there is an easy solution to this I just haven't figured out
Thanks!
I have a few NPCs that once you've interacted with them, you shouldn't be able to interact with them again until the quest "Talk to X" becomes active again. At first I tried using SetActive() to switch off the conversation zone at the end of the conversation, but that was causing the player to get stuck in place (I guess because the player is still technically in the conversation).
Currently I'm using a variable on the dialogue system trigger (IsInteractable) which, if false, doesn't start the conversation. The problem is that the interactable prompts still show up, they just don't start a conversation when interacted with, which feels glitchy and clutters up the level.
I'm wondering if any of the following would work/which is best?
Option 1: In the conversation zone, there are Activation Conditions - can these be hooked up with Dialogue System variables at all? If so, the IsInteractable variable could be used here instead of the dialogue system trigger.
Option 2: Multiple dialogue system triggers, one that starts the conversation and one that deactivates the conversation zone on conversation end - not sure if this is possible or if it would glitch out.
Option 3: The Activable checkbox in the activation conditions - could this be turned on and off using the sequencer perhaps?
Alternatively maybe there is an easy solution to this I just haven't figured out
Thanks!