Trigger Recursion How-To

Posted by Xvordan on Wed 19 Oct 2016 07:37 PM — 3 posts, 14,406 views.

#0
I'm playing a mud that prefaces a lot of line with the same boilerplate, so I have a trigger to shorten it for sanity's sake.
For example: Notice: "This is what's happening.", becomes "This is what's happening.".

My problem is that I sometimes want to trigger based on the text following the boilerplate. If I set up further triggers to react on Notice: "...", the trigger doesn't work. If I set it up to react on the modified output, it doesn't work either.
I've tried changing the sequence of the master substitution trigger that strips the "Notice:" bit off to both higher and lower values without any success. Trying to do so with the keep evaluating checkbox didn't seem to work either.

I have seen this work in a plugin form before: The plugin had a trigger that removed the boilerplate, and I was able to create a world trigger containing the original (unmodified) text, and have both of them work -- the text was shortened, and any automatic reactions I wanted based on the changing text also worked.

I'm using the master substitution trigger right in the world in this case, however. Is there any way I can get this to work, or should I just export the substitution out to a plugin?
Australia Forum Administrator #1
Both triggers should be "keep evaluating" or at least the one with the lower sequence number. Thus the low-sequence trigger can match on the original line (and let it keep evaluating) and the higher-sequence trigger can omit the line and replace it with the word "Notice" removed.
#2
Strange. I swear I tried this arrangement before, but obviously I must not have. Just tried it and it did work, so thank you for indulging my newbie moment.