Page 1 of 1

Highlighting a past line

Posted: Sun Jan 16, 2011 2:55 am
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.

Re: Highlighting a past line

Posted: Sun Jan 16, 2011 3:13 am
by Iocun
moveCursor("main", 1, getLineCount()-1)
selectCurrentLine()
fg("green")
resetFormat()


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.