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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
zorfrit
Newbie


Joined: 21 May 2021
Posts: 3

PostPosted: Fri May 21, 2021 5:54 am   

Help with buttons
 
< Health(582,784/582,784) Ki(5,945,024/5,945,375) >
< Powerlevel(113.4t/15.00t) Armor(97,602/97,632) Stamina (3,445/3,445) >
so thats what it looks like in the mud i play when im not in combat


when im in combat it looks like this

<Health[582,784] Armor[97,602] Ki[5,945,024]
Powerlevel[113.4t/15,000,000,000,000] and the health will go down when im damaged
idk how to make a button for Health and Ki can someone hep me
Reply with quote
hpoonis2010
Adept


Joined: 18 Jun 2019
Posts: 279

PostPosted: Fri May 21, 2021 6:14 am   
 
? A button to do what?
Reply with quote
zorfrit
Newbie


Joined: 21 May 2021
Posts: 3

PostPosted: Fri May 21, 2021 6:28 am   Health bar and a Ki bar
 
my bad i need a button to show a Health gauge and Ki gauge
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4671
Location: Pensacola, FL, USA

PostPosted: Fri May 21, 2021 8:25 pm   
 
You need to make a trigger to capture the data into variables, which your (gauge) button can then display.

Code:
#TR {Health~((%n)/(%n)~) Ki~((%n)/(%n)~)} {
  hp=%1
  hpMax=%2
  ki=%3
  kiMax=%4
  }


Code:
#TR {Health~[(%n)~] Armor~[(%n)~] Ki~[(%n)~]} {
  hp=%1
  armor=%2
  ki=%3
  }


You may or may not need to make those into prompt triggers, it really depends on how they send the data to you. The option to set that is in the settings editor, at the bottom of the trigger.

Making the button gauge is also best done is the settings editor entirely.
After you create a new button from the big 'New' button at the top of the screen, change the 'Type' to Guage.
Then you can switch to the Guage tab at the bottom and input the variables:
Caption: Health: @hp
Value: @hp
Max: @hpMap
Low: @hpMax/3

And that is a basic gauge.
You can even add color from this tab.
If you want to get fancy with the size, position, etc, all of that is on the Options tab.
_________________
Discord: Shalimarwildcat
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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