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


Joined: 28 Oct 2003
Posts: 10

PostPosted: Tue Oct 28, 2003 6:16 pm   

Order of triggers on the same word?
 
How can you order triggers in case they have a word in common. That is, I have two triggers: one on the word "says", the other on "The small wood says". : the first trigger captures the line to a new window and beep, but the second trigger should gag the input without beeping.

Basically, all 'says' should go to another window and beep (this is easy), except for the character 'The small wood' which should be gagged without beeping. I've tried gagging on 'The small wood', but it doesnot work: the first trigger already generates a beep.

Is this possible?

Thanks!
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Tue Oct 28, 2003 6:58 pm   
 
Triggers execute in the order that they appear in the Settings Editor window. make sure that View|Sort By|None is selected and then drag and drop the trigger you want to the new position in the list.
Reply with quote
riemer11
Beginner


Joined: 28 Oct 2003
Posts: 10

PostPosted: Wed Oct 29, 2003 11:06 am   
 
Thanks! This works perfectly.

One thing though, is that you should not use class folders since it is apparantly impossible to change the order of these folders? But simply putting the triggers that need ordering into the general folder, solves this issue.

Thanks again!
Reply with quote
seamer
Magician


Joined: 26 Feb 2001
Posts: 358
Location: Australia

PostPosted: Wed Oct 29, 2003 11:53 am   
 
You could do a basic ifcheck on the say...

#act {%1 says '%2'} {#if ("%1"=="The small wood") {#abort 1} {#cap says;#beep}}
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Wed Oct 29, 2003 5:49 pm   
 
You don't need to move the class folders. The triggers are evaluated in their unsorted order no matter what class they are in.

Simple demonstration script:
#TR temp1 {test} {#SAY temp1 class0}
#TR temp2 {test} {#SAY temp2 class1} {class1}
#TR temp3 {test} {#SAY temp3 class0}
#TR temp4 {test} {#SAY temp4 class2} {class2}
#TR temp5 {test} {#SAY temp5 class2} {class2}
#TR temp6 {test} {#SAY temp6 class1} {class1}
#TR temp7 {test} {#SAY temp7 class0}

Then just type in test (or #SAY test). As you'll see, they all fire in the correct order even though I deliberately mixed up the order of classes.

You can view all triggers at once with the All Classes option from the View menu. If you have them Sorted by None you'll be able to see the order they're in and move them to the desired firing order. There's no reason not to use classes.
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