I was looking into this earlier, but I wanted to just match a specific word on my line and make it highlight. "You have 24/200 hit, 34/68 mana, and 112/120 moves." I want to highlight the hit points green, the mana, yellow, and the moves orange. Would it just be easier to make a trigger for each word I want highlighted or can I put it all in one script?demonnic wrote:By default, it will only highlight the part it matches.
adding this to the trigger's script should help you out:
What this does is select the line the trigger has matched on, sets the foreground (or text) color to green, then clears the selection and resets format so your next triggers/lines come out looking as intended and you don't accidentally bleed into other text.
Color Trigger Question
-
- Posts: 1
- Joined: Fri Mar 21, 2014 5:02 pm
Re: Color Trigger Question
Re: Color Trigger Question
So if regex looks like this:
^You have (\d+)/(\d+) hit, (\d+)/(\d+) mana, and (\d+)/(\d+) moves.$
Then you could do:
^You have (\d+)/(\d+) hit, (\d+)/(\d+) mana, and (\d+)/(\d+) moves.$
Then you could do: