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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
atcbdEjp
Newbie


Joined: 05 Dec 2001
Posts: 4

PostPosted: Wed Dec 05, 2001 3:08 am   

Gauges
 
I want to make hp gauge, how do you go about getting a forumla
Reply with quote
undergod
Wanderer


Joined: 27 Jun 2001
Posts: 82

PostPosted: Wed Dec 05, 2001 6:36 am   
 
If you have a registered version of ZMud, there is a plugin available for download from the Zuggsoft site that automatically makes gauges for you. All you have to do is capture the HP values into variables. It's really straightforward.
Reply with quote
Troubadour
GURU


Joined: 14 Oct 2000
Posts: 556
Location: USA

PostPosted: Wed Dec 05, 2001 7:31 pm   
 
First thing you need is a prompt trigger to capture your data. Let's pretend your prompt looks like this:

HP:456/890 MA:393/491 MV:12/930>

The trigger would look like this:


#TR {HP:(%d)/(%d) MA:(%d)/(%d) MV:(%d)/(%d)~>} {
#VAR hp %1
#VAR maxhp %2
#VAR mana %3
#VAR maxmana %4
#VAR moves %5
#VAR maxmoves %6
} "" "prompt"

Be sure to put the word "prompt" at he end of the trigger or check the "Trigger on Prompt" box in the trigger's settings editor.

Next, you'll need to build your gauges. Since I'm a lazy lazy man, I'm taking this one from the help files:


#GAUGE hpgauge "hp" @hp @maxhp (@maxhp/10) "" "blue" "red"


You can do gauges for mana and moves as well if you like.

Troubadour
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Wed Dec 05, 2001 7:57 pm   
 
Note that if you want to make additional gauges for mana and moves it's easiest to do so in the editor (they come under Buttons). If you just reuse the #GAUGE commmand with different variables all the gauges will be placed at the same location so only one will be visible, but from the editor you can choose "autoposition" and they will be placed side-by-side instead.

LightBulb
Reply with quote
atcbdEjp
Newbie


Joined: 05 Dec 2001
Posts: 4

PostPosted: Wed Dec 05, 2001 11:26 pm   
 
ok what does %d mean

zmud has incomplete list of builtin


it appears the are a place holder for %1 % etc
Reply with quote
Troubadour
GURU


Joined: 14 Oct 2000
Posts: 556
Location: USA

PostPosted: Thu Dec 06, 2001 1:23 am   
 
%d is a pattern used to match any number of digits (0-9). There are lots of wild cards which can be used to narrowly define the trigger pattern. It is preferable to use the wild cards in the pattern rather than %1, %2, %3, etc. (Values captured are still represented by %1, %2, %3 in the action portion of the trigger.)

Troubadour
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD 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