Condition (Result) Change in the Same(Repeated) Conversation
Posted: Mon May 09, 2022 9:33 am
Don't know how to "RESET" the Result my Conditions.
I've been trying create a Craft/Merchant(Shop) function. by using this DialogueSystem
For example, I set a npc named "Bonfire" and whenever the player run into it he will trigger the Conversation which has 3 nodes: "Get warmed" , "Roast some meat" and "You don't have: Raw Meat!".
I set a variable (number) ""RawMeat" and a Condition "RawMeat>=1" linked to that Roast node(by the "..."button).
It worked at the first time that the player run into the ""You don't..." node when I didn't get meat in my inventory and the variable"RawMeat" did shows "0" (in the Dialogue Editor page).
Conversely, when i get a meat first and the the variable did shows "1", then the player run into the "Roast.."node and I did get that roast through some of my C#s.
The problem is, when I triggered that Condition, it doesn't get updated(Changed): I run into the "You don't" node without the meat and soon I get a meat to interact with that "Bonfire" again(variable "RawMeat" shows "1"), but this time the "Bonfire" still said"You don't".
Same as the contrary(Restart the Game): I get a meat first then run into "Roast some" this time, the interesting thing is I can still trigger that "Roast" node even I don't get any meat at inventory(even the Variable has already been reduced to minus)
It seems that the condition result(true/false) it returned doesn't get changed actually, did I do something wrong?
How could I fix it?
I've been trying create a Craft/Merchant(Shop) function. by using this DialogueSystem
For example, I set a npc named "Bonfire" and whenever the player run into it he will trigger the Conversation which has 3 nodes: "Get warmed" , "Roast some meat" and "You don't have: Raw Meat!".
I set a variable (number) ""RawMeat" and a Condition "RawMeat>=1" linked to that Roast node(by the "..."button).
It worked at the first time that the player run into the ""You don't..." node when I didn't get meat in my inventory and the variable"RawMeat" did shows "0" (in the Dialogue Editor page).
Conversely, when i get a meat first and the the variable did shows "1", then the player run into the "Roast.."node and I did get that roast through some of my C#s.
The problem is, when I triggered that Condition, it doesn't get updated(Changed): I run into the "You don't" node without the meat and soon I get a meat to interact with that "Bonfire" again(variable "RawMeat" shows "1"), but this time the "Bonfire" still said"You don't".
Same as the contrary(Restart the Game): I get a meat first then run into "Roast some" this time, the interesting thing is I can still trigger that "Roast" node even I don't get any meat at inventory(even the Variable has already been reduced to minus)
It seems that the condition result(true/false) it returned doesn't get changed actually, did I do something wrong?
How could I fix it?