Hi. I am working in Harlowe with Twine 2.0.11. I am having trouble making my conversational links flow without leaving white space where visited links were. The best answer I came up with so far is to set a variable to true after a passage is visited, then show grayed out links for those passages, like this:
(if: $gretaname is true)[(textcolor: "gray")[**"What is your name?"**]](else:)
greta name]
(if: $gretahome is true)[(textcolor: "gray")[**"Do you live around here?**]](else:)
greta home]
(if: $gretadog is true)[(textcolor: "gray")[**"That's a cute little dog you've got there."**]](else:)
greta dog]
Before I started graying out the visited links I just wrote something like:
(if: $gretaname is true)[] (else:) ["What is your name?"]
But that leaves whitespace where the link was.
I would like to have the clicked links
disappear without leaving whitespace instead of graying them out.
But I can't figure it out because I might have a list of 5 different links and I want the reader to be able to click on them
in any order.
Hope this makes sense. Thanks.
Comments
There are a number of ways to control where line-breaks are shown, the following shows a link between two lines of text when the $var variable is false. If you change the $var variable to true then the link disappears and the second line of text appears directly below the first.
Passage name: ask_greta
Ask her about...
greta_name
greta_dog
greta_home
(set: $gretaname to false)
(set: $gretadog to false)
(set: $gretahome to false)
Passage name: greta_name
"My name is Greta."
(if: not $gretadog)greta_dog]
(if: not $gretahome)greta_home]
(set: $gretaname to true)
Passage name: greta_dog
"My dog's name is Bertie."
(if: not $gretahome)greta_home]
(if: not $gretaname)greta_name]
(set: $gretadog to true)
Passage name: greta_home
"I live on Thimbleton street."
(if: not $gretadog)greta_dog]
(if: not $gretaname)greta_name]
(set: $gretahome to true)
As I said in my previous comment, each line-break you add to the passage contents will generally add white-space to the output.
If you don't want that to happen then you need to either take care where you place those line-breaks or use markup to Collapse the whitespace.
In the following versions of your question passages I have move the two line-breaks that appeared directly after the end ] of the first (if:) macro's hook to now appear within that hook, this results on that end now being directly before the second (if:) macro.
A. greta_name passage: B. greta_dog passage: C. greta_home passage
Greyelf, will do on the C button.
As for the rest… I will try moving the line breaks. I didn't realize it was that easy. How embarrisking ;-)
Thanks so much.