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
daemoan.vermillious
Apprentice


Joined: 28 Feb 2009
Posts: 135
Location: Chico, Ca

PostPosted: Wed Nov 11, 2009 5:03 pm   

Buttons into life bars?
 
so if I already have my @hpcurrent and @hpmax

what is it I must do to the button options and whats the proper trigger syntax?
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Wed Nov 11, 2009 5:19 pm   
 
The easy way is to set the button as a gauge type. This will create a new tab called Gauge that more clearly exposes the gauge properties found on the Options tab.

Max value will, of course, be @hpmax. Value will be @hpcurrent. The low point will be some equation representing a point between 0 and @hpmax where, when @hpcurrent goes below, the gauge will change color. For example, @hpmax / 4 equates to the %25 mark.

The colors should be self-explanatory.
_________________
EDIT: I didn't like my old signature
Reply with quote
daemoan.vermillious
Apprentice


Joined: 28 Feb 2009
Posts: 135
Location: Chico, Ca

PostPosted: Wed Nov 11, 2009 5:31 pm   
 
I have my button bar right aligned.....
I was wanting the bars to be vertical on the top of that bar like 3 bars next to eachother hp mana move ....
how is that I can put them next to eachotehr?


Nevermind I got it stack....
Reply with quote
daemoan.vermillious
Apprentice


Joined: 28 Feb 2009
Posts: 135
Location: Chico, Ca

PostPosted: Wed Nov 11, 2009 5:58 pm   
 
So Matt are you saying theres no way to do real time updating to the bars? point for point scaling?
and in the thing theres a place for a vaiable and expression? why doesnt it work just like @hpmax in variable and @hpcurrent in the expression?
Reply with quote
orphean
Apprentice


Joined: 21 Oct 2008
Posts: 147
Location: Olympia, WA

PostPosted: Wed Nov 11, 2009 6:10 pm   
 
That is how it works. As Matt said, in the Guage tab of the button, you would put @hpmax into 'Max Value' and @hpcurrent into 'Value', set the colors you want, and that's it. It will automatically update itself when either of those variables are changed.
Reply with quote
Josiah.Bruns
Apprentice


Joined: 04 Mar 2007
Posts: 103

PostPosted: Wed Nov 11, 2009 9:20 pm   
 
Here is the xml version i my status bars and hp stuff.

here is the text reguarding status from my mud
-=> HP: 470/470 END: 289/290 <=-

<class name="Status" id="285">
<class name="Gauge" id="217">
<trigger priority="2180" id="218">
<pattern><![CDATA[-=> HP: &Hp/&HpMax END: &End/&EndMax <=-]]></pattern>
<value>#If (@Hp<150) {'heal me please}</value>
</trigger>
<var name="Hp" id="219">383</var>
<var name="HpMax" id="220">470</var>
<var name="End" id="221">290</var>
<var name="EndMax" id="222">290</var>
<button type="Gauge" variable="@Hp" autosize="false" width="100" height="18" toolbar="2" color="lime" gaugelowcol="red" gaugebackcol="silver" priority="2236" id="223">
<caption>HP: @Hp / @HpMax</caption>
<expr>@Hp</expr>
<gaugemax>@HpMax</gaugemax>
<gaugelow>@HpMax/5</gaugelow>
</button>
<button type="Gauge" variable="@End" autosize="false" width="100" height="18" toolbar="2" color="purple" gaugelowcol="red" gaugebackcol="silver" priority="2452" id="245">
<caption>End: @End /@EndMax</caption>
<expr>@End</expr>
<gaugemax>@EndMax</gaugemax>
<gaugelow>@EndMax/5</gaugelow>
</button>
</class>
Reply with quote
orphean
Apprentice


Joined: 21 Oct 2008
Posts: 147
Location: Olympia, WA

PostPosted: Wed Nov 11, 2009 9:53 pm   
 
I was about to post that the above works great and didn't know why it wasn't working for daemoan. Then I realized Josiah posted it, whoops. Razz
Reply with quote
hadar
Apprentice


Joined: 30 Aug 2009
Posts: 198
Location: my apt, in california

PostPosted: Wed Nov 11, 2009 10:10 pm   
 
D.V, why would you need gauges to track your stuff? in the last code i made you i put hp/mana/move trackers that represent it in a bar graph form?
_________________
if you build it they will come, assuming that they have not already come to build it
Aardwolf Bootcamp
My youtube channel
Reply with quote
daemoan.vermillious
Apprentice


Joined: 28 Feb 2009
Posts: 135
Location: Chico, Ca

PostPosted: Wed Nov 11, 2009 10:20 pm   quicker update?
 
trying to quicken my update......
this is my prompt:
<[34323862] [3470HP 6000MA 1000MV]>

~<~[%d~] ~[&%dhitcurrentHP &%dmanacurentMA &%dmovecurrentMV~]~>

I think that should work but it doesnt??????
Reply with quote
hadar
Apprentice


Joined: 30 Aug 2009
Posts: 198
Location: my apt, in california

PostPosted: Wed Nov 11, 2009 11:27 pm   
 
what i made you if you typed the starting command i told you should give you realtime updates .... if you did not its not going to work ... only reason i told you to type the command was because it changes the prompt into something better suited for scripting like you wanted
_________________
if you build it they will come, assuming that they have not already come to build it
Aardwolf Bootcamp
My youtube channel
Reply with quote
Tarken Aurelius
Apprentice


Joined: 23 Oct 2008
Posts: 120
Location: Cincinnati, Ohio

PostPosted: Wed Nov 11, 2009 11:28 pm   
 
Put the variable names in brackets:

Code:
~<~[%d~] ~[&%d{hitcurrent}HP &%d{manacurent}MA &%d{movecurrent}MV~]~> }


and notice that your second 'current' is misspelled as 'curent', that could be it as well. :)
_________________
Tarken Aurelius, quality triggers since 2004! Trigger consulting since 2008! Content Developer at BatMUD (www.bat.org)
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