Click one word to make the next line of text appear

Hello! I’m sorry if this is a relatively basic question, but I was just wondering if anyone could help me with this. Basically what I want to do is have it so when you click on the link in the first line of text, the second line of text appears below it.

1 Like

Just based on the Harlowe documentation, you could use link-reveal:

The (link-reveal: ) macro

(link-reveal: String, [Changer] ) → Changer

When attached to a hook, this replaces the hook with a link that has the given text. The link, when clicked, reveals the hook and becomes plain, unstyled text. An optional changer can be given to alter the style of the link (instead of altering the style of the attached hook).

Example usage:

(link-reveal: "Heart")[broken] will create a link reading “Heart” which, when clicked, changes to plain text, and shows “broken” after it.

Rationale:

This is similar to (link:), but allows the text of the link to remain in the passage after it is clicked. It allows key words and phrases in the passage to expand and reveal more text after themselves. Simply attach it to a hook, and the hook will only be revealed when the link is clicked.

Or the click: macro:

There is a small dish of water. (click: "dish")[Your finger gets wet.]

2 Likes