Hi
In the database, I have created a variable named "HP"; and some conversations.
And I use a dialogue trigger to start a bark action, the bark source are these conversations, bark order with random.
Then I give these conversations two kinds of conditions:
1: 30 < Variable["HP"] and Variable["HP"] <= 50, I call these conversations "kind A"
2: Variable["HP"] <= 30, I call these conversations "kind B"
I set "HP" with a float value when a button click. At this point I expect, when I set 30<"HP"<50, "kind A" conversations will be trigger, and when "HP"<30, "kind B" will be trigger.
But in I test demo, there are all random……In the case that I have checked the database with debug message and the variables are correct.
Conversation does not match the variables? or conditions problem?
Re: Conversation does not match the variables? or conditions problem?
Hi,
If you're using a Dialogue System Trigger, did you tick Cache Bark Lines? If so, please untick it. This option ignores Conditions on dialogue entry nodes.
If you're using a Dialogue System Trigger, did you tick Cache Bark Lines? If so, please untick it. This option ignores Conditions on dialogue entry nodes.
Re: Conversation does not match the variables? or conditions problem?
Can you send a reproduction project to tony (at) pixelcrushers.com?
Here's an example scene that works correctly:
DS_BarkConditionsTest_2022-06-15.unitypackage
Here's an example scene that works correctly:
DS_BarkConditionsTest_2022-06-15.unitypackage
Re: Conversation does not match the variables? or conditions problem?
Thanks for sending the reproduction project.
The problem is that the button does not change the Lua variable value:
Do not change the value in your dialogue database. Change the Lua value.
In C# or Visual Scripting, you can use DialogueLua.SetVariable() to set the Lua variable value. Example:
Or you can configure a Dialogue System Trigger:
The problem is that the button does not change the Lua variable value:
Do not change the value in your dialogue database. Change the Lua value.
In C# or Visual Scripting, you can use DialogueLua.SetVariable() to set the Lua variable value. Example:
Code: Select all
DialogueLua.SetVariable("HP", 25);