[SOLVED] Stop the NPCs from the same dialogues using Quest Machine

Announcements, support questions, and discussion for Quest Machine.
Post Reply
Mchia_Soo
Posts: 72
Joined: Sun Jun 30, 2019 11:59 pm

[SOLVED] Stop the NPCs from the same dialogues using Quest Machine

Post by Mchia_Soo »

Hey Tony!

In my game, I have a number of NPCs in which the player has to talk to. They are not the quest giver, just the random people in the environment. I wish to disable the NPCs after player has talked to them. I have tried to put some dialogues in True state, such as, "You have talked to me before." but nothing is coming out as the first dialogue comes out again.

Also, I have tried in my own dialogues by setting the SetQuestNodeState and GetQuestNodeState. But yea, nothing is worked.

Do you have any idea?
Last edited by Mchia_Soo on Tue Sep 10, 2019 4:51 am, edited 1 time in total.
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: Stop the NPCs from the same dialogues using Quest Machine

Post by Tony Li »

For these random people, are you starting the conversation using the Dialogue System or Quest Machine?

If you're using a Dialogue System Trigger:

If you're using the Dialogue System's interaction system (Usable component and Selector or ProximitySelector), then disable the NPC's Usable component after the conversation. You can use the Dialogue System Trigger's Set Component Enabled/Disabled action to do this.

Otherwise add a variable to remember that the player has talked to the NPC. In the conversation, set the variable true. In the Dialogue System Trigger, set the Condition section to require that the variable is still false.
Mchia_Soo
Posts: 72
Joined: Sun Jun 30, 2019 11:59 pm

Re: [SOLVED] Stop the NPCs from the same dialogues using Quest Machine

Post by Mchia_Soo »

Problem solved! Thanks.
Post Reply