|
Xandr Newbie
Joined: 22 Aug 2011 Posts: 1
|
Posted: 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! Thank you!
Xandr |
|
|
|
ralgith Sorcerer
Joined: 13 Jan 2006 Posts: 715
|
Posted: 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 |
|
|
|
|
|