Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
spectacle1982
Newbie


Joined: 17 Apr 2004
Posts: 3
Location: USA

PostPosted: Sat Apr 17, 2004 6:01 pm   

Button color control
 
I have created buttons that display my Hp and movement points. I was wondering if I could create a trigger to make the background color on those buttons change based on the percentage of hp and mvt points i have left i.e., 100% green, 60% yellow, 30% red. Any one know a trigger?
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Sat Apr 17, 2004 7:44 pm   
 
Yes you can, but changing the buttons into guages would be simpler and give more info at a single glance. If you really want to just use simple colors then whatever trigger you are using to capture your hp and movement should preform the calculations and use the %btncol function to change the colors.
Reply with quote
spectacle1982
Newbie


Joined: 17 Apr 2004
Posts: 3
Location: USA

PostPosted: Sat Apr 17, 2004 8:51 pm   
 
How do you set up a gauge? I've never used one before.

FYI: My trigger for my hp/mvt is
#TRIGGER {(%d)h/(%d)H} {#VAR @hp %1;#VAR @Mhp %2

Same for movement, with different variables of course.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Sun Apr 18, 2004 2:09 am   
 
The settings editor is the best way to set up a gauge. Simply change your current button to have a type of gauge then put fill in the information on the "Gauge" tab. Max would be "@Mhp", value would be "@hp", gauge low would be "@Mhp*6/10", and set the colors appropiately.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net