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


Joined: 22 Aug 2011
Posts: 1

PostPosted: Mon Aug 22, 2011 12:52 am   

Need help with setting up a gauge please
 
Hello, I just started playing this cmud game called Akanbar. I wanted to make a gauge but i am very confused... i tried following another tutorial on here but it didn't work. I have the gauge made but not the variables. the health and mana look like this:

1440/1440h 180/180m >

If you could please explain how to make that into a gauge it would be much appreciated! Very Happy Thank you!

Xandr
Reply with quote
ralgith
Sorcerer


Joined: 13 Jan 2006
Posts: 715

PostPosted: Mon Aug 22, 2011 12:21 pm   
 
Change charname in the code below to your character's name. You may be able to just use %char, I'm not sure if that works with the . syntax for this type of record variable or not.
Code:

#CLASS {Health}
#TRIGGER {(%d)/(%d)h (%d)/(%d)m >} {#VAR charname.hp %1;#VAR charname.maxhp %2;#VAR charname.ma %3;#VAR charname.maxma %4}
#VAR charname.hp 0
#VAR charname.maxhp 0
#VAR charname.ma 0
#VAR charname.maxma 0
#CLASS 0


This will load a record type variable with your stats. You will probably want to set it as a trigger on prompt instead of on newline. I don't know if the syntax for that changed between zMUD and CMUD for command line, but its easy to do from the package manager. Once the variables are loaded by the trigger, you can use them in your gauge easy enough.
_________________
CrossOver: Windows Compatibility on Mac and Linux CMUD Advocate
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