Variables not Incrementing On Trigger

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Marushia Dark
Posts: 8
Joined: Sun Sep 01, 2024 8:43 am

Variables not Incrementing On Trigger

Post 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
Screenshot 2024-09-02 041918.png (52.55 KiB) Viewed 62 times
Screenshot 2024-09-02 041902.png
Screenshot 2024-09-02 041902.png (10.72 KiB) Viewed 62 times
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: Variables not Incrementing On Trigger

Post 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.
Post Reply