|
riemer11 Beginner
Joined: 28 Oct 2003 Posts: 10
|
Posted: 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! |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: 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.
|
|
|
|
riemer11 Beginner
Joined: 28 Oct 2003 Posts: 10
|
Posted: 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! |
|
|
|
seamer Magician
Joined: 26 Feb 2001 Posts: 358 Location: Australia
|
Posted: 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}} |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: 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. |
|
|
|
|
|