How to choose a question

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
minomod
Posts: 89
Joined: Mon Jun 19, 2017 9:17 am

How to choose a question

Post by minomod »

I want to split the conversation in the above UI, but I always choose 1 automatically. How can I solve this?
Attachments
1.png
1.png (61.94 KiB) Viewed 425 times
User avatar
Tony Li
Posts: 20604
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to choose a question

Post 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.
minomod
Posts: 89
Joined: Mon Jun 19, 2017 9:17 am

Re: How to choose a question

Post by minomod »

I want to do something like this screenshot
Attachments
2.png
2.png (186.07 KiB) Viewed 419 times
minomod
Posts: 89
Joined: Mon Jun 19, 2017 9:17 am

Re: How to choose a question

Post by minomod »


If you set the player, it will be exposed as a screenshot. :)
Attachments
3.png
3.png (15.22 KiB) Viewed 419 times
User avatar
Tony Li
Posts: 20604
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to choose a question

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