I have a prefab UI, it contains a Dialogue. This Dialogue has a "Coin" Variable. And a condition on the converstation need to use it.
My Player kills enemy and collect coin. I am using 'DialogueTriggerSystem' to change 'Coin' value. But when player meet NPC and open the Dialogue. Even player kills 100 enemies, the 'Coin' Variable equals 0.
How i change value of a Variable before Dialogue contains it not yet open ?
(My player does not meet NPC first, after kill many enemies, he will meet NPC, at the moment the dialogue start)
Set value for a Variable of a Dialogue before Start it.
-
- Posts: 1
- Joined: Tue Jul 25, 2023 6:04 am
Re: Set value for a Variable of a Dialogue before Start it.
Hi,
Let's first make sure your Coin variable is incrementing. Use the Dialogue Editor's Watches tab or the Variable Viewer window.
Here's an example scene:
DS_CoinExample_2023-07-25.unitypackage
Let's first make sure your Coin variable is incrementing. Use the Dialogue Editor's Watches tab or the Variable Viewer window.
Here's an example scene:
DS_CoinExample_2023-07-25.unitypackage