How to choose a question
How to choose a question
I want to split the conversation in the above UI, but I always choose 1 automatically. How can I solve this?
- Attachments
-
- 1.png (61.94 KiB) Viewed 425 times
Re: How to choose a question
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:
and James:2's Conditions to:
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.
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"
Code: Select all
Variable["favoriteColor"] ~= "blue"
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
I want to do something like this screenshot
- Attachments
-
- 2.png (186.07 KiB) Viewed 419 times
Re: How to choose a question
If you set the player, it will be exposed as a screenshot.
- Attachments
-
- 3.png (15.22 KiB) Viewed 419 times
Re: How to choose a question
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.