Page 1 of 1

Putting Conversations in Order with same Trigger

Posted: Thu Jul 04, 2024 6:38 pm
by emberise
Hello,

I was hoping someone could help me out with this. I have a game where a player presses a button, has a conversation with an NPC, and then when that conversation ends, the player can press the same button, spawning in a new NPC and starting a new conversation with said new NPC. I have had success setting up the trigger, and having a whole (singular) conversation. My issue is currently understanding the logic of how to "queue" up the conversations so that the player can have them one after another, by pressing the same button.

If anyone could help with some advice that would be fantastic, thank you so much!

Re: Putting Conversations in Order with same Trigger

Posted: Fri Jul 05, 2024 12:20 am
by Tony Li
Hi,

You could do this similarly to the second post on How To: Run a Conversation Only Once. In your specific case, you might want to use multiple Dialogue System Triggers (the first suggestion in the second post's list) so you can assign different actors to each Dialogue System Trigger.

Re: Putting Conversations in Order with same Trigger

Posted: Mon Jul 15, 2024 10:39 pm
by emberise
In terms of the dialogue, that worked perfectly! Thank you so much for that! Right now I am still struggling with getting the Gameobjects to setactive at the end of the conversation. (Have one NPC disappear from the place, and have another one take it's place)

Re: Putting Conversations in Order with same Trigger

Posted: Tue Jul 16, 2024 8:44 am
by Tony Li
Hi!

Add an empty dialogue entry node at the end of the conversation. Set the Sequence field to:

Code: Select all

Continue()
You can type it manually or select "+" > Continue > Simulate continue button click.

Then add an OnExecute UnityEvent > Scene Event to deactivate one GameObject and activate the other, or use the SetActive () sequencer command. For example, let's say you want to deactivate a GameObject named Adam and activate one named Bob. In this case, you'd set the Sequence field to:

Code: Select all

required SetActive(Adam, false);
required SetActive(Bob, true);
Continue()