[Solved] Switch conversation from same character.

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Japtor
Posts: 120
Joined: Thu Jun 28, 2018 1:41 pm

[Solved] Switch conversation from same character.

Post by Japtor »

Hi,

In the first scene, I have planned that the same NPC could say two different conversations at different points.

While the scene is active, can you switch the Dialogue System Trigger -> Actions -> Conversation to another one when it has finished?

Thanks!
Last edited by Japtor on Sat Dec 15, 2018 1:43 pm, edited 3 times in total.
User avatar
Tony Li
Posts: 22057
Joined: Thu Jul 18, 2013 1:27 pm

Re: Switch conversation from same character.

Post by Tony Li »

Hi,

You could do that with a script, but I recommend this solution instead: Define a variable that you can check to know which conversation to play. Add two Dialogue System Triggers. In the Condition sections, check the variable.
ava
Posts: 17
Joined: Tue Oct 30, 2018 2:53 pm

Re: Switch conversation from same character.

Post by ava »

I just noticed that this question is very similar to my question: viewtopic.php?f=3&t=1770

I can accept this solution if there are two dialogs, but what if the NPC has +/- 20 dialogs? It seems quite complex to add multiple triggers...
User avatar
Tony Li
Posts: 22057
Joined: Thu Jul 18, 2013 1:27 pm

Re: Switch conversation from same character.

Post by Tony Li »

Hi,

In that case, use a single Dialogue System Trigger that starts a "hub" conversation. Use cross-conversation links in the hub conversation to link to each of the 20 conversations. Add a condition to the first node of each conversation so that only one is true at any given time. I actually prefer this because it keeps all the logic in one place (the dialogue database).
Japtor
Posts: 120
Joined: Thu Jun 28, 2018 1:41 pm

Re: Switch conversation from same character.

Post by Japtor »

Thanks for your answer! :)
User avatar
Tony Li
Posts: 22057
Joined: Thu Jul 18, 2013 1:27 pm

Re: [Solved] Switch conversation from same character.

Post by Tony Li »

You're welcome! :-)
Japtor
Posts: 120
Joined: Thu Jun 28, 2018 1:41 pm

Re: [Solved] Switch conversation from same character.

Post by Japtor »

Hi,

I want to return to this post as I have a doubt.
Tony Li wrote: Tue Oct 30, 2018 4:04 pm Hi,

In that case, use a single Dialogue System Trigger that starts a "hub" conversation. Use cross-conversation links in the hub conversation to link to each of the 20 conversations. Add a condition to the first node of each conversation so that only one is true at any given time. I actually prefer this because it keeps all the logic in one place (the dialogue database).
What about If I want to maintain that same logic, but now with the bark dialogues? It won't be a problem If there is only a node connected to the Start node of a conversation. However, If a bark conversation has 2 or more dialogue nodes connected to the Start node (the idea is to randomly bark one of those)... Which position should I pick as the start node? (look spoiler image)
Spoiler
Image
If I pick "0: <START>", it doesn't spawn a bark. If I pick the number 1, it always shows the first even having inside the Dialogue System Trigger -> Bark Order -> Random, and the same if I pick number 2.

What should I do in that case?

Thanks! :)
User avatar
Tony Li
Posts: 22057
Joined: Thu Jul 18, 2013 1:27 pm

Re: Switch conversation from same character.

Post by Tony Li »

Hi,

Link from <START> to a Group node. Then link the Group node to the actual text nodes (Sigo esperando... and Continue...).

In your hub conversation, link to the Group node.
Japtor
Posts: 120
Joined: Thu Jun 28, 2018 1:41 pm

Re: Switch conversation from same character.

Post by Japtor »

Hi,

Oh, fantastic! It worked!

Thanks! :)
Post Reply