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


Joined: 16 Feb 2001
Posts: 57

PostPosted: Sat Oct 11, 2003 2:48 am   

Temp trigger firing more than once
 
I've got a temp trigger on the initial trigger of a multistate trigger that loops lines for the second state. The temp trigger's pattern is ^$ to look for a blank line, but I want to print out a result of what the looping state has done (that part of the trigger modifies some variables). But as the temp trigger fires on the empty line, I print a message that also has an empty line, so it triggers on itself, even though the temp trigger has already been activated.

I've gotten around this by #untrigger-ing as the first command of the temp trigger, but is there any other way to avoid this issue?

#TRIGGER "Stuff" {Pattern} {#VARIABLE Blah {};#TEMP {^$} {#STATE {Stuff} (0);#UNTRIGGER {^$} {Class};#IF (@Blah != "") {#SAY {Blah%cr}}} Class} "Class" {case|verbatim}
#COND {^Pattern2} {Blah=BlahBlah} {looplines|param=50|case}
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sat Oct 11, 2003 4:27 am   
 
Yes. Don't put an empty line in your #SAY.
#TRIGGER "Stuff" {Pattern} {#VARIABLE Blah {};#TEMP {^$} {#STATE {Stuff} (0);#IF (@Blah != "") {#SAY {Blah%cr" "}}} Class} "Class" {case|verbatim}
#COND {^Pattern2} {Blah=BlahBlah} {looplines|param=50|case}
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