Reveal Hidden Text or More Info

In your scenario, you might want to have some hidden text, such as coaching or hints. There are a couple of ways to accomplish this in Twine, depending on what you need. The link: macro replaces a link with additional text, making it one of the simplest methods. The link-show: macro shows a named hook (basically, text with a name). That means link-show: is good for showing text in multiple places, like reference information.

The link: macro

The link: macro is also known as link-replace: because it replaces the link text with whatever is inside a hook. I suggest reading the documentation on link: to understand it better.

(link:"Tell me more.")[''Additional info:''
Add more info here]

In this example, the link initially looks exactly like a regular link, with the text “Tell me more.”

The phone rings.

(3 links shown below)

Answer it.

Let it go to voice mail.

Tell me more.

After you click the “tell me more” link, it hides the link text and shows this additional information.

The same as the previous image, but now the "Tell me more" link is replaced by the text: "Additional info:
Add more info here."

The link-show: macro

Another method uses the link-show: macro. Read the documentation for details. This is a little more complicated than a regular link: macro, but very useful if you want to create reference information and make it available in multiple places.

In this example, users can click a link to read additional text.

(link-show:"Read the transcript of the voice mail.",?transcript)
|transcript)[This message is for Luisa. Can you call me back when you get a chance? No pressure.]
  • link-show: The name of the macro
  • The text for the link goes inside quotes.
  • ?transcript: Calls the “hook” named transcript
  • |transcript): This creates a named hook called transcript. Because it has a close parenthesis at the end, the hook is hidden until something happens to show it.
  • The text of the hidden hook is enclosed in brackets.

Results of a link-show: macro

Link text: Read the transcript of the voice mail.
The link before clicking
Read the transcript of the voice mail.
This message is for Luisa. Can you call me back when you get a chance? No pressure.
The link after clicking, with the additional text below.