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


Joined: 26 Jul 2007
Posts: 4

PostPosted: Thu Jul 26, 2007 1:48 am   

Please help me make a gauge work
 
I am trying to make what I thought would be some pretty simple gauges.

I have MXP data from the mud as so:

hp is %mud.hp
max hp is %mud.maxhp

Setting the guage value and max fields with these two variables, causes a guage that always shows full.

I can set the name correctly %mud.hp/%mud.maxhp will give me 50/100 etc., but the guage itself does not work.

Any ideas? Thanks.
Reply with quote
Uileat
Newbie


Joined: 26 Jul 2007
Posts: 4

PostPosted: Thu Jul 26, 2007 4:07 am   
 
I thought I had it figured out. I made a new variable called HPcur. I set HPcur = (%mud.hp). When I type say @HPcur, it displays "50". The guage WAS working at first. But then all of a sudden it stopped. I have no idea why. It's just frozen at full again. I can verify that the mxp values in the properties are updating.
Reply with quote
Arminas
Wizard


Joined: 11 Jul 2002
Posts: 1265
Location: USA

PostPosted: Thu Jul 26, 2007 1:09 pm   
 
It should not be necessary but in your case I would try making an expression trigger.

(%mud.hp!=@HPcur)Or(%mud.maxhp!=@HPmax)

Then for the script.

#var HPcur %mud.hp
#var HPmax %mud.maxhp

Then use the variables @HPcur and @HPmax in the value and max value boxes in the guage tab.
_________________
Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram
Reply with quote
Uileat
Newbie


Joined: 26 Jul 2007
Posts: 4

PostPosted: Fri Jul 27, 2007 2:01 am   
 
It doesn't work. My variables were getting updated. I made a simple trigger that echoed the value of the variable so I could test... the variable works. The gauges do not work. No matter what I do, I cannot get a gauge to work at all.
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Fri Jul 27, 2007 4:59 pm   
 
I've got a few bugs on my bug list relating to gauges not working correctly, so I'm guess that is part of the problem. As Uileat mentioned, the variables get updated, but the gauge doesn't update. It might help to put one of the variables that is changing into the Caption of the gauge button. This might help the button get updated when the variable changes.
Reply with quote
Uileat
Newbie


Joined: 26 Jul 2007
Posts: 4

PostPosted: Sat Jul 28, 2007 1:38 am   
 
I've tried just about anything I can think of. I'll hold off for now and test again on the next beta version. Thanks for the reply.
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