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
Eyeless
Wanderer


Joined: 02 Dec 2001
Posts: 80
Location: Canada

PostPosted: Sun Mar 13, 2005 11:13 pm   

Toggle buttons?
 
Is there a way to check and set the state of a toggle button?

What I need to do is have zMUD check to see what state the button is in, and toggle it to the desired state if it is not in that state.

e.g.: I have a button 'ON' something occurs that will change the button state, but I want it to remain on because certain things are not met. Possible? I guess I could add more code to the actual button, not really desired though
Reply with quote
Dharkael
Enchanter


Joined: 05 Mar 2003
Posts: 593
Location: Canada

PostPosted: Sun Mar 13, 2005 11:29 pm   
 
Edit the Button
On the advanced tab the entry labeled Variable type the name of the variable that you want to to hold the state the state that the button is currently in;
The entry labeled Value is an expression that can be used to control the state of the button.
Value is an expression so you can type the actual logic to control the state here as long as it returns an integer representing a state, or you could make a simple expression that points to a variable
something like @SetState
then you can manipulate the SetState variable to control the state of the button.
_________________
-Dharkael-
"No matter how subtle the wizard, a knife between the shoulder blades will seriously cramp his style."
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