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
nutsnbolts
Apprentice


Joined: 01 May 2002
Posts: 188
Location: USA

PostPosted: Mon Feb 06, 2006 6:34 am   

Button autochange from Trigger.
 
I have a toggle that also has alias to manipulate the turning on and off scripts.

However, whenever I leave the mud or reconnect, I need to make sure that my buttons are reflecting the correct state.

For instance,
An XP COUNTER...

I can type startxp and it will echo on the screen, "XP IS ON"
If I type stopxp, it will echo "XP IS OFF"

Basically I created a TOGGLE BUTTON to turn this on and off. What I would like to do is basically type "stopxp" or "startxp" and depending on whether it is on or off, it will change the state of the buttons to match it.

What's the best way to do this?
_________________
Thank you for everything, it's always appreciated.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Mon Feb 06, 2006 11:22 am   
 
Use the Variable field in the Advanced tab of the button. The specified variable will change when the button is pushed and the button will change when the variable is changed.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
nutsnbolts
Apprentice


Joined: 01 May 2002
Posts: 188
Location: USA

PostPosted: Mon Feb 06, 2006 5:58 pm   
 
I'm a bit confused. Here is what I have for the button "advanced"

ID: xpcounter
Variable: xpcountercheck
Value: 0

#Trigger {Xpcounter is disabled.} {#var xpcountercheck 0}

However, whenever I press the button, it becomes a push button as opposed to a toggle. So if I turn it on, it doesn't change state. What am I doing wrong?
_________________
Thank you for everything, it's always appreciated.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Mon Feb 06, 2006 9:58 pm   
 
You don't need the Value field to contain anything. Value tells ZMud what the state is, and since you have to set to 0 the toggle button never gets to reach the pushed-down (1) state.
_________________
EDIT: I didn't like my old signature
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