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


Joined: 02 Jun 2006
Posts: 9
Location: Kansas

PostPosted: Sat Jul 15, 2006 4:53 pm   

Healing trigger
 
Hello, I have another problem I have a trigger that heals my spell points if it drops below a cutoff I have set. My problem is that some mobs can hit 3, 4, or more times each round and sometimes I end up wasting stuuf that heals my sps. I was thinking if there was a way to add a delay to the trigger once it fires so it wont fire again for a sec or 2.

Thank You,
Louis
Reply with quote
Larkin
Wizard


Joined: 25 Mar 2003
Posts: 1113
Location: USA

PostPosted: Sat Jul 15, 2006 9:39 pm   
 
If you want a trigger to be effectively disabled for a fixed period after it fires, I recommend using a multi-state trigger. The first state is the normal trigger with your pattern and command. The second state has no pattern or command and is just a wait type with a delay parameter specified.

Code:
#TRIGGER {Your pattern} {your commands}
#COND {} {} {wait|param=2000}


The trigger will stay in that second state for two seconds, and since only one state can be active at a time, this prevents the first state from firing again until the timeout (or you manually reset it with the #STATE command).
Reply with quote
igorshadow
Newbie


Joined: 02 Jun 2006
Posts: 9
Location: Kansas

PostPosted: Sun Jul 16, 2006 2:26 am   
 
Thanks I will try it out :)

I tried it out and it works great :)

Thank you,
Lou
Reply with quote
leonardofaoro
Novice


Joined: 07 Feb 2008
Posts: 40
Location: Italy

PostPosted: Sun Mar 23, 2008 5:03 pm   
 
#trig {pattern} {heal;#wait 2000}
Don't need any Condition for such a simple trigger.
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Sun Mar 23, 2008 6:03 pm   
 
A wait state is much more reliable than the #wait command - really, you should only be using #wait to slow down loops, because it can cause all kinds of problems in triggers. Search the forums for info on that, or just accept it as true :P
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
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