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
Space_Pilot
Beginner


Joined: 03 Oct 2005
Posts: 24

PostPosted: Sat Oct 15, 2005 3:18 pm   

Gauge trouble
 
This is freaking me out. I have been trying to make my health/mana gauges to work, but I havn't succeeded yet. I have read every thread regarding gauges, I have tried different methods, but none have worked. My prompt looks like this:

hp: 1068(1068) sp: 499(499)

My problem is the ( and ). Should I use a ~ before those? Anyways, I need a little help, so if you feel like helping, go for it.

Yeah, the only problem is how to get the information. I know how to make the gauges and so on, because I have a working gauge on another mud. :/
Reply with quote
Space_Pilot
Beginner


Joined: 03 Oct 2005
Posts: 24

PostPosted: Sat Oct 15, 2005 3:54 pm   
 
This is how I did it. First, to capture the information from the prompt "hp: 1068(1005) sp: 493(493)" I made a trigger that looked like this:

^hp: (%d)?(%d)? sp: (%d)?(%d)?$

Then I made four variables:

@hp = %1
@maxhp = %2
@sp = %3
@maxsp = %4

Then I made a gauge, with this information:

Kind: gauge
Caption: hp: @hp / @maxhp

Value: @hp
Gauge Max: @maxhp
Gauge Low: @maxhp/5

My gauge looks like this:

hp: %1 / %2

To do this, I took help from this page ( http://www.thetabworld.com/zombiemud/triggers_and_variables.jsp;jsessionid=DPCINMMNKKCC ), which uses the exact same prompt or short score, and is from the exact same mud. Is there something small that I have missed? What am I saying, there must be something I have missed, because it isn't working.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Sat Oct 15, 2005 4:39 pm   
 
Use the ~( and ~). Parentheses are special characters, as you obviously know. Such characters that come from the mud need to be quoted.

As for the trigger itself, do you have it set to trigger on prompt?
_________________
EDIT: I didn't like my old signature
Reply with quote
Vorax
Apprentice


Joined: 29 Jun 2001
Posts: 198
Location: USA

PostPosted: Sat Oct 15, 2005 9:00 pm   
 
Space_Pilot wrote:
Then I made four variables:

@hp = %1
@maxhp = %2
@sp = %3
@maxsp = %4
That may be the problem. Variables don't need the @ when you assign values to them in this way. Instead, it should be:
Code:
hp = %1
maxhp = %2
sp = %3
maxsp = %4
Reply with quote
OmegaDeus
Apprentice


Joined: 14 Sep 2005
Posts: 121

PostPosted: Sun Oct 16, 2005 12:19 am   
 
You can actually set your prompt in zmud to automatically catch numbers from the prompt, this is found in the preferences under surprise surprise, MUD prompt, all you have to do is set what it starts with and add all variables needed. This is the way I collect the information for my gauges.



All you have to do is put @hp @hpmax @sp @spmax and you'll be set.
_________________


Look at me I've got zSKILLS
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