 |
eleytheria Beginner
Joined: 05 Feb 2013 Posts: 15 Location: Canada
|
Posted: Thu Feb 07, 2013 2:38 am
A question about triggers. |
Hello again!
So I have a question about triggers firing at the same time. Say I have 4 triggers, that do this:
#TRIGGER {An acrobat laughs, cartwheeling towards you.} {emote screams loudly!}
#TRIGGER {Laughing, an acrobat flails a flaming hula hoop around.} {emote screams loudly!}
#TRIGGER { An acrobat does a flying leap and lands gracefully.} {emote screams loudly!}
#TRIGGER {An acrobat swings across the room on a trapeze.} {emote screams loudly!}
And the mobol happens to make all four actions happen at the same time, like so:
An acrobat laughs, cartwheeling towards you.
Laughing, an acrobat flails a flaming hula hoop around.
An acrobat does a flying leap and lands gracefully.
An acrobat swings across the room on a trapeze.
Instead of my response being:
emote screams loudly!
emote screams loudly!
emote screams loudly!
emote screams loudly!
I would like to make it so that only the first trigger fires, instead of all four:
#TRIGGER {An acrobat laughs, cartwheeling towards you.} {emote screams loudly!}
How would I do this? |
|
|
 |
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Thu Feb 07, 2013 3:45 am |
delete the other three triggers.
|
|
_________________ EDIT: I didn't like my old signature |
|
|
 |
eleytheria Beginner
Joined: 05 Feb 2013 Posts: 15 Location: Canada
|
Posted: Thu Feb 07, 2013 4:16 am |
That won't help me at all. I need all of the triggers. I said the mobol "happens" to make all four actions at the same time. Sometimes only one action happens. Sometimes they happen in different orders. |
|
|
 |
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Thu Feb 07, 2013 2:29 pm |
How exactly do you want these triggers limited? You need to figure that out first. There are several possibilities. Let us assume the mob has actions A through G, and you normally want to send the emote after actions A, B, C, or D.
Option 1) Mob does action A, B, C, or D. The emote fires, and all four triggers are turned off (the easy way to do this is to put them all in one class, and disable the entire class). The triggers are turned back on when the mob does action E, F, or G.
Option 2) Mob does action A, B, C, or D. The emote fires, and all four triggers are turned off. The triggers are turned on when you receive _any_ message from the mud other than action A, B, C, or D, or your own emote.
Option 3) Mob does action A, B, C, or D. The emote fires, and all four triggers are turned off. The triggers are turned back on after some number of seconds. |
|
|
 |
eleytheria Beginner
Joined: 05 Feb 2013 Posts: 15 Location: Canada
|
Posted: Thu Feb 07, 2013 5:04 pm |
I want only the first line to fire. I have tried disabling the triggers after they fire, and they do turn off, but the issue I'm having is that all four seem to be firing at the same time.
It is also possible for all the actions to happen at one time, as in, A A A A. In this case, I still only want the first line to fire.
I also tried using #IF %pos("acrobat",%line2) {} {emote screams loudly!} but that didn't work either. |
|
|
 |
eleytheria Beginner
Joined: 05 Feb 2013 Posts: 15 Location: Canada
|
Posted: Thu Feb 07, 2013 7:55 pm |
I think I was trying to make this too complicated. I tried it again and just disabled the class and it worked like a charm, thanks!
|
|
|
 |
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Fri Feb 08, 2013 1:44 am |
I know you only wanted the first one to fire. I was asking what method you wanted to use to turn them back on. I assume you do want it to turn back on somehow? Have you solved that part yet?
|
|
|
 |
eleytheria Beginner
Joined: 05 Feb 2013 Posts: 15 Location: Canada
|
Posted: Fri Feb 08, 2013 5:11 am |
Yup thanks! Got it working how I wanted to.
Now I'm trying to figure out how to make a single trigger have an option between 1 or two choices in the pattern. Don't know if it's even possible.
Man this is fun. |
|
|
 |
eleytheria Beginner
Joined: 05 Feb 2013 Posts: 15 Location: Canada
|
Posted: Fri Feb 08, 2013 7:08 am |
Heh, that was easy...
|
|
|
 |
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Fri Feb 08, 2013 10:12 pm |
Excellent! Yes, this stuff can be fun. Enjoy!
|
|
|
 |
|
|