Highlighting a past line

Post Reply
Posts: 2
Joined: Wed Jan 12, 2011 5:27 pm

Highlighting a past line

Post by sykellus »

I'm trying to highlight a line depending on the line following it. What I've done so far is make a trigger gate with the line-to-be-highlighted as the original gate, and then making it match for one more line, and the children of the gate the line that follows the line-to-be-highlighted.

The point is that I don't want the line to be highlighted if I get a certain line following it (in Achaea, I'm highlighting the "You prick whoever twice in rapid succession" message, and I don't want it highlighted if the next line is "The attack rebounds back onto you!").

So, in the script for the children triggers (the triggers for the 2nd line), what script do I need to put to make it highlight the line above? I've tried moveCursor with no success (unless I am just doing it wrong).

Thanks for your help.

Posts: 174
Joined: Wed Dec 02, 2009 1:45 am

Re: Highlighting a past line

Post by Iocun »

moveCursor("main", 1, getLineCount()-1)

This will color the line above the current one green. If you wanted to color the one -two- above the current one, you'd use: getLineCount()-2 etc.

Post Reply