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


Joined: 23 Jun 2002
Posts: 13

PostPosted: Wed Jun 26, 2002 2:51 am   

Trigger Return Value (If Any?)
 
Does a trigger return any value if it is set off...if so what? OR, is there any command that will return a value (possibly non-zero) if that trigger is executed? I am trying to make a small script that uses the #UNTIL command. Once the trigger is set off, I want the rest of that block to not be executed.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Wed Jun 26, 2002 3:00 am   
 
You can make a trigger return anything you want. Just have it set a variable in its script.
Reply with quote
mudman
Beginner


Joined: 23 Jun 2002
Posts: 13

PostPosted: Wed Jun 26, 2002 7:05 am   
 
Heh. Such a simple solution...I didn't think of it...thanks Vijilante
Reply with quote
mudman
Beginner


Joined: 23 Jun 2002
Posts: 13

PostPosted: Wed Jun 26, 2002 7:25 am   
 
It seems I demand more of this "return". For example, if I have a block of code with a trigger at the top, the trigger will not execute until AFTER the entire block is done being executed. Here's what I mean (This is all within the trigger "You flee from combat!"):

#TRIGGER {Ralph}{Var1=@TheDirection}
TheDirection=south
scan north
TheDirection=west
scan east
TheDirection=north
scan south
TheDirection=east
scan west
TheDirection=down
scan up
TheDirection=up
scan down
#MOVE @Var1

So, what I'm trying to do here is if the "Ralph" trigger is set off while scaning in all directions (Let's say it was triggered after scanning south), I want the block to stop being executed before its completion (I'll use #UNTIL command to accomplish this). What I don't know how to do is to have some value be retured EXACTLY when the "Ralph" pattern is matched. Still need some help there, but thanks Vijilante.
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