Prompt trigger captures data but processes old data

Post Reply
jwrobbs
Posts: 21
Joined: Sat Sep 23, 2017 1:26 am

Prompt trigger captures data but processes old data

Post by jwrobbs »

Goal: capture data from prompt and display in gauges

Method: Trigger matches the prompt. It stores the data in variables then uses the variables to update the gauges.

Issue: The gauge is updated with old data. Basically, I have to trigger the scripts twice.

Example: I have 90HP and heal to 100HP on the tick. The Prompt says 90 and the gauge says 90. Then the prompt says 100 but the gauge still says 90. When I get another prompt, for any reason, the gauge will say 100.

Here's the code:
Code: [show] | [select all] lua
-- get values
myHealth = matches[2]
maxHealth = matches[3]
ETC, ETC

-- display values
setGauge("hp_bar", myHealth, maxHealth,"HP")
ETC,ETC
I don't even know what to troubleshoot. It's like the scripts are running in reverse order.

jwrobbs
Posts: 21
Joined: Sat Sep 23, 2017 1:26 am

Re: Prompt trigger captures data but processes old data

Post by jwrobbs »

Figured it out - my hourly script was dying in the middle of the process and killed the update.

User avatar
demonnic
Posts: 883
Joined: Sat Dec 05, 2009 3:19 pm

Re: Prompt trigger captures data but processes old data

Post by demonnic »

Glad you were able to get it sorted =)

Post Reply