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


Joined: 07 Feb 2004
Posts: 10
Location: USA

PostPosted: Sun Aug 08, 2004 4:58 am   

A question about buttons
 
Crying or Very sad I've been having quite the time trying to figure out how to make buttons do a certain thing, and help or an example of an entire button would be greatly appreciated.

This is what I want the button to do....

Ok, for instance, I want the button when clicked to turn white, and do the following commands: c 'detect invis';c 'detect magic'

The button is named "Detects". Then, when the things wear off, The button goes red.

The wear off signs are "You no longer see invisible objects."
And.... "You no longer detect magical auras."

If either one of those wears off, the button should go back to red. Then when I click it, it goes white again... Is this possible? I want to make it easier to know if something wore off in the heat of combat or whatnot. Any help is appreciated. Email me with the result if you want, because I can't get online very often lately. Jebikoje@hotmail.com Thanks a ton.
_________________
I play on Carrionfields.
Reply with quote
parrotslave
Wanderer


Joined: 01 Jul 2002
Posts: 81
Location: USA

PostPosted: Sun Aug 08, 2004 5:58 am   
 
I would make two toggle buttons, nne for invisible and one for auras

Button up would be red and have the command, button down would be white.

Make triggers for "You no longer see invisible objects." and "You no longer detect magical auras." that use the #bu command to automatically press the buttons.
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sun Aug 08, 2004 6:54 am   
 
Add a command to change the button color to white:
c 'detect invis';c 'detect magic';#CALL %btncol( Detects, white)

Use triggers to change the color to red:
#TR {You no longer see invisible objects.} {#CALL %btncol( Detects, red)}

Detects must be the button's ID and not just its caption. You could also use the button's number.
_________________
LightBulb
Senior member

Most scripts in this forum are written for Command Line entry.
Don't even open the Settings Editor unless its use is specified or obvious.
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