I'm using Twine 2.1.1 w/ Harlowe.
I have a temp variable called "_parser" that lives in a "header" passage. I want to use this to style certain lines of text that are meant to be in a "narrator voice" which talks to the reader, different from the regular text of the story.
(set: _parser to (text-colour: yellow))
I use this like so in passages, which works fine:
Jane pets her cat. _parser[Do you have cat?]
But when I try this:
_parser[You're going to love this part.]
[CONTINUE]<cont| (click-replace:?cont)[Jane pets her cat. _parser[Do you have a cat?]]
I get the runtime message "There isn't a temp variable named _parser in this place." Is there any way to get the inside-the-hook reference to the temp variable to know about the global one in the header? Is that the problem? Thanks for the help!
Comments
You could get rid of the variable altogether and use CSS combined with a named hook to do the same thing. It will work in both situations and reduces the number of variables the system needs to track, it also makes it easier to add more complex styling to the parser's text if you choose to do so later.
Add the following to your Story Stylesheet area: ... the modify your passage contents to the following: