Page 1 of 1

Prompt trigger captures data but processes old data

Posted: Mon Mar 01, 2021 4:29 pm
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.

Re: Prompt trigger captures data but processes old data

Posted: Mon Mar 01, 2021 4:38 pm
by jwrobbs
Figured it out - my hourly script was dying in the middle of the process and killed the update.

Re: Prompt trigger captures data but processes old data

Posted: Mon Mar 01, 2021 5:46 pm
by demonnic
Glad you were able to get it sorted =)