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


Joined: 23 Sep 2003
Posts: 1
Location: Canada

PostPosted: Tue Sep 23, 2003 4:27 pm   

Question about toggle button
 
I just recently started playing around with buttons, and stumbled into the following problem.
I have a toggle button that is supposed to show if I am presently affected by a spell. Button is controlled by a variable, and some simple trigs change the variable. When the spell is cast - button presses in. Spell wears off - button de-presses.
I also wanted to add a command to a depressed button, so that I can cast the said spell by clicking it. And this is when I begun having a problem. Suppose some nice fella decided to save me some sp, and cast the spell for me. The trigger catches it, presses in the button, and ends up casting the spell, even though I don't need it any more.
Is there any way I can 'persuade' the button to execute command only when manually clicked, and not pressed in with the variable change ?

Here I have the trigs (slightly edited for simplicity)

#BUTTON 2 {PoE off} {cast power of earth at cezar} {PoE on} {} {} {poe} {} {} {} {} {} {} {} {} {} {} {} "" {} {} {poe_button}
#TRIGGER {You bulge with power!} {#var poe 1 } "powerups"
#TRIGGER {You feel weaker as the power of Earth leaves you.} {#var poe 0} "powerups"

Thanks in advance
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Tue Sep 23, 2003 10:03 pm   
 
Nope. If the button has a command to execute, it will execute it either way.
Reply with quote
dskorren
Novice


Joined: 07 Feb 2002
Posts: 48
Location: Philippines

PostPosted: Thu Sep 25, 2003 1:55 am   
 
make an alias on your spell ups (if its long) or just manually type c <spell> and trigger on spell up/down phrase, that way your button will be on its right state regardless of the person/npc spelling you up.

you can also make a recast key that contains a bunch of IFs that checks every spellup button and if its off, it casts that particular spellup. of course your mud might have the "loose concentration routine even if your not interrupted" w/c is a pain, but you can always press the key again after its done. :)
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