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
Lazul
Newbie


Joined: 02 May 2007
Posts: 2

PostPosted: Wed May 02, 2007 5:09 am   

Gauge Caption
 
I'm working on making a gauge that displays my current and maximum health, mana, and ego for Lusternia. Everything I have in the gauge works properly, however, when I try putting:

@health/@maxhealth

In for the "Name" of the gauge, it returns:

/

Altering the value of the variables causes the gauge to raise and lower as it should. The low-level color trips when it should... everything works except the Caption. If I just enter "health" into the name, it shows "health", but if I try using the variables I get blanks.

I've tried:

@health/@maxhealth
[@health]/[@maxhealth]
(@health)/(@maxhealth)
<@health>/<@maxhealth>


Nothing seems to work. What am I missing here?
Reply with quote
balrugh
Newbie


Joined: 20 Apr 2004
Posts: 9

PostPosted: Wed May 02, 2007 5:53 am   
 
Maybe {@health}/{@maxhealth} ??

I think that {} expand the variables.

Sorry for my english
Reply with quote
Lazul
Newbie


Joined: 02 May 2007
Posts: 2

PostPosted: Wed May 02, 2007 5:54 am   
 
Nope... tried that, too.
Reply with quote
hogarius
Adept


Joined: 29 Jan 2003
Posts: 221
Location: islands.genesismuds.org

PostPosted: Wed May 02, 2007 11:00 am   
 
What about making a separate variable...

HValue=@health/@maxhealth

...and then putting @HValue as the name of the button?

EDIT: You'd probably want to make sure all three values are designated as "Float" -type variables.
Reply with quote
Larkin
Wizard


Joined: 25 Mar 2003
Posts: 1113
Location: USA

PostPosted: Wed May 02, 2007 11:39 am   
 
What about @health"/"@maxhealth?
Reply with quote
hogarius
Adept


Joined: 29 Jan 2003
Posts: 221
Location: islands.genesismuds.org

PostPosted: Wed May 02, 2007 11:46 am   
 
I was doing some playing with variables and such in the command line. Another approach to the situation might be to force evaluation of the expression by enclosing the entire expression in parentheses for the Name of the button.

(@health/@maxhealth)

Again, you probably want to do some tweaking with the variable types and such.
Reply with quote
hogarius
Adept


Joined: 29 Jan 2003
Posts: 221
Location: islands.genesismuds.org

PostPosted: Wed May 02, 2007 11:50 am   
 
Embarassed I'm guessing Larkin's suggestion is more along the lines of what you're looking for, Lazul.
Reply with quote
mordeth
Newbie


Joined: 10 Feb 2006
Posts: 6

PostPosted: Wed May 02, 2007 12:08 pm   
 
This works fine for me for a gauge

HP @hp/@MaxHp

of cause you'll have to have a trigger to capture the hp/gp etc
Reply with quote
Chris_3413
Novice


Joined: 22 Mar 2004
Posts: 46
Location: Australia

PostPosted: Thu May 03, 2007 1:56 pm   
 
No problems here using 2 variables either side of a / in a guage caption.. ive got several guages trackign different things and it all displays correctly for me
_________________
What do you mean, Fatal Error!
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