Remove Interaction after a dialogue has been played.
Remove Interaction after a dialogue has been played.
Hello, I just bought Dialogue System for Unity and i'm a beginner in Unity. I wanted to know how can I remove interactibility on an NPC after he said a specific line of dialogue? I want the player to make a choice in the dialogue and if he makes the wrong one, then he cannot interact with this NPC anymore. But if he chose the right one, then the dialogue continues.
- Attachments
-
- ronny.JPG (189.45 KiB) Viewed 1112 times
-
- ronny.JPG (189.45 KiB) Viewed 1112 times
Re: Remove Interaction after a dialogue has been played.
Hi,
Thanks for using the Dialogue System!
Please see: How To: Run a Conversation Only Once
If you have any questions about it, let me know. I've finished work for the night, but I can reply back in the morning.
Thanks for using the Dialogue System!
Please see: How To: Run a Conversation Only Once
If you have any questions about it, let me know. I've finished work for the night, but I can reply back in the morning.
Re: Remove Interaction after a dialogue has been played.
That worked! Thank you so much for your reply, the only issue I have now is that we can still see the UI. The "Press E to talk" on the NPC. I've tried to find the issue on the forum to solve it, but somehow I couldn't or maybe I just did some bad research lol
Re: Remove Interaction after a dialogue has been played.
Hi,
If the conversation should always remove interaction, configure the Dialogue System Trigger's Actions > OnExecute() event to disable the NPC's Usable component.
If the conversation should remove interaction only if the player chooses a specific branch of the conversation tree, then use an OnExecute scene event or SetEnabled() sequencer command to disable the Usable component.
If the NPC's Usable component is disabled, the Selector/ProximitySelector won't select it.
If the conversation should always remove interaction, configure the Dialogue System Trigger's Actions > OnExecute() event to disable the NPC's Usable component.
If the conversation should remove interaction only if the player chooses a specific branch of the conversation tree, then use an OnExecute scene event or SetEnabled() sequencer command to disable the Usable component.
If the NPC's Usable component is disabled, the Selector/ProximitySelector won't select it.