Multiline Colour Trigger

Post Reply
Tichi
Posts: 4
Joined: Fri Apr 17, 2009 5:18 pm

Multiline Colour Trigger

Post by Tichi »

I'm trying to create a trigger that will highlight the text, for example, "There are 3 fink guards here.", in a specific colour. However, that line can be broken up over two lines, as below:

The shadowy outline of a twisted forest casts a dark gloom here. There are 3
fink guards here.

Or it could be all on one line, as below:
The shadowy outline of a twisted forest casts a dark gloom here. The rough stone
walls here enclose the guardroom tightly, with only the exits to north,
southwest and southeast providing ample space to stand. This room is almost
bare, only a rickety table and chair to furnish the bare rock. A few oily rags
lie next to broken armour. The terrible smell of fink still pervades this area.
There are 3 fink guards here.

How would I write this trigger? I've tried a few different ways, can't seem to get anywhere with it though :(

User avatar
Heiko
Site Admin
Posts: 1548
Joined: Wed Mar 11, 2009 6:26 pm

Re: Multiline Colour Trigger

Post by Heiko »

There's several possible solutions.

The simplest one is to use the multistate machine.
Make each word of the sentence a substring pattern conditon, chose the AND-Trigger property, chose an appropriate line delta (2 in your case) and chose a highlighter color. That's it.

Tichi
Posts: 4
Joined: Fri Apr 17, 2009 5:18 pm

Re: Multiline Colour Trigger

Post by Tichi »

Perfect, thanks! I wasn't fully understanding how the and trigger worked. I think I got it now.

Post Reply