Page 1 of 1
Variables not Incrementing On Trigger
Posted: Mon Sep 02, 2024 4:21 am
by Marushia Dark
I have a quest item with a Useable and Dialogue Trigger script attached, as well as a variable named "Arrows" but when I enter, the object gets disabled, yet doesn't increment the count in the Database. No idea why. It's not returning any errors and no other scripts are modifying the value at that time. What am I missing or doing wrong?
- Screenshot 2024-09-02 041918.png (52.55 KiB) Viewed 63 times
- Screenshot 2024-09-02 041902.png (10.72 KiB) Viewed 63 times
Re: Variables not Incrementing On Trigger
Posted: Mon Sep 02, 2024 7:49 am
by Tony Li
Hi,
Use the
Watches tab. (Select Menu > Add All Runtime Variables)
The Dialogue Editor shows the initial read-only values of the dialogue database, not the current runtime values stored in the Lua environment. The exception is the Watches tab. You can also watch the runtime values using the separate
Variable View window.
Also, add UpdateTracker() to your Dialogue System Trigger's Lua code:
Code: Select all
Variable["Arrows"] = Variable["Arrows"] + 1;
UpdateTracker()
This will tell the
quest tracker HUD to update itself based on the updated variable value.