Remove Interaction after a dialogue has been played.

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
oshiro95
Posts: 2
Joined: Thu Dec 05, 2024 7:36 pm

Remove Interaction after a dialogue has been played.

Post 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.
Attachments
ronny.JPG
ronny.JPG (189.45 KiB) Viewed 1101 times
ronny.JPG
ronny.JPG (189.45 KiB) Viewed 1101 times
User avatar
Tony Li
Posts: 23256
Joined: Thu Jul 18, 2013 1:27 pm

Re: Remove Interaction after a dialogue has been played.

Post 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.
oshiro95
Posts: 2
Joined: Thu Dec 05, 2024 7:36 pm

Re: Remove Interaction after a dialogue has been played.

Post 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
User avatar
Tony Li
Posts: 23256
Joined: Thu Jul 18, 2013 1:27 pm

Re: Remove Interaction after a dialogue has been played.

Post 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.
Post Reply