Page 1 of 1

Remove Interaction after a dialogue has been played.

Posted: Thu Dec 05, 2024 7:46 pm
by oshiro95
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.

Re: Remove Interaction after a dialogue has been played.

Posted: Thu Dec 05, 2024 9:00 pm
by Tony Li
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.

Re: Remove Interaction after a dialogue has been played.

Posted: Fri Dec 06, 2024 8:11 am
by oshiro95
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.

Posted: Fri Dec 06, 2024 8:17 am
by Tony Li
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.