Make gauges update automatically

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

Make gauges update automatically

Post by jwrobbs » Wed Jan 16, 2019 1:37 am

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 » Wed Jan 16, 2019 1:58 am

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 » Wed Jan 16, 2019 2:02 am

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 » Wed Jan 16, 2019 2:09 am

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 » Wed Jan 16, 2019 2:19 am

:ugeek:

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

Re: Make gauges update automatically

Post by Vadi » Wed Jan 16, 2019 6:18 am

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

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 10 guests