Make gauges update automatically

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

Make gauges update automatically

Post by jwrobbs »

I've been going thru the material about Geyser: https://wiki.mudlet.org/w/Manual:Geyser#Geyser.Gauge

I have a trigger (in triggers) that stores the numbers I need.
I have a script (in scripts) that creates and styles the gauges.

But the gauges only update when I save the script even though I know the variables are changing. What did I do wrong? What did I miss?

valaria
Posts: 17
Joined: Tue Dec 22, 2009 11:27 pm

Re: Make gauges update automatically

Post by valaria »

did you add code in triggers that use those numbers to update the gauge like e.g:

Code: Select all

hp_bar:setValue(current_health, max_health)
?

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

Re: Make gauges update automatically

Post by jwrobbs »

No, it's in the script.

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

Re: Make gauges update automatically

Post by jwrobbs »

That fixed it. I swore I read that the scripts got processed on every line. I assume that is incorrect.

valaria
Posts: 17
Joined: Tue Dec 22, 2009 11:27 pm

Re: Make gauges update automatically

Post by valaria »

:ugeek:

User avatar
Vadi
Posts: 4824
Joined: Sat Mar 14, 2009 3:13 pm

Re: Make gauges update automatically

Post by Vadi »

Scripts only get processed on startup and when you save them - it is triggers that get processed for every line.

Post Reply