Page 1 of 1

Help With Gauges

Posted: Wed Jul 17, 2019 12:13 pm
by somekid6
So I am pretty new to Mudlet and scripting so to start I downloaded a GUI that I liked the look of and started trying to add to it. When I got the health gauges I found a problem.

Currently what I have for the set value is,
setValue((100/gmcp.Char.Vitals.maxhp)*gmcp.Char.Vitals.hp,100,gmcp.Char.Vitals.hp)

which I got from the geyser manual,

However whenever I launch Mudlet or restart the gauges glitch out and only show a single thick bar instead of four different ones
Screenshot (24).png
When I go to the scripts menu and click on the script for the gauges they go back to looking normally
Screenshot (25).png
Why does this happen?

My theory is that because I am logging on and the gauge can't know my health before I log on to my character. Is there a way to fix this?

Re: Help With Gauges

Posted: Mon Aug 12, 2019 11:29 am
by Vain
I had to keep the random number for the script which created and initialized the gauges
GUI.Health:setValue(math.random(100),100)

And then update with the actual values using a script or trigger