Page 1 of 1

How to choose a question

Posted: Wed Jul 26, 2017 10:34 am
by minomod
I want to split the conversation in the above UI, but I always choose 1 automatically. How can I solve this?

Re: How to choose a question

Posted: Wed Jul 26, 2017 1:14 pm
by Tony Li
Hi,

Use Conditions.

The Dialogue System will always use the first dialogue entry node whose Conditions are true. (A blank Conditions field is considered true.) For example, let's say you've defined a dialogue database variable named "favoriteColor".

You could set James:1's Conditions to:

Code: Select all

Variable["favoriteColor"] == "blue"
and James:2's Conditions to:

Code: Select all

Variable["favoriteColor"] ~= "blue"
If the variable is set to "blue", the conversation will use James:1. Otherwise it will use James:2.

In addition, each link arrow has a priority level. The default priority is Normal. To change the priority, select the link arrow and select a new priority level from the dropdown in the inspector. The Dialogue System checks the highest priority level first. If it finds a valid node, it will use it. Otherwise it will check the next-highest priority level, and so on.

If you want to choose one of the nodes randomly, look at this post or this post.

Re: How to choose a question

Posted: Thu Jul 27, 2017 9:57 am
by minomod
I want to do something like this screenshot

Re: How to choose a question

Posted: Thu Jul 27, 2017 10:03 am
by minomod

If you set the player, it will be exposed as a screenshot. :)

Re: How to choose a question

Posted: Thu Jul 27, 2017 10:22 am
by Tony Li
Got it! Sorry, I misunderstood. Yes, if all of the links (e.g., from John:select) lead to nodes assigned to an "IsPlayer" actor, then the Dialogue System will show a response menu like above. If any link is assigned to a non-"IsPlayer" actor, the Dialogue System will automatically play that node. In other words, the Dialogue System gives preference to NPC lines. If there are no NPC lines, it will show a player response menu.