Help With Gauges

Post Reply
somekid6
Posts: 1
Joined: Wed Jul 17, 2019 11:42 am

Help With Gauges

Post by somekid6 » Wed Jul 17, 2019 12:13 pm

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?

Vain
Posts: 2
Joined: Tue May 29, 2018 11:37 am

Re: Help With Gauges

Post by Vain » Mon Aug 12, 2019 11:29 am

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

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests