Hide a Link Until Other Passages are Viewed

Sharmila Adhya asked, “Is there any way to have a “Continue” button in Twine, that gets activated, after the learner has explored different options on that same page?”

Example

Here’s a very quick prototype I created to test how to do this with hidden links. Try it to see how it works.

Visited macro

This is possible with the visited: macro in Harlowe.

When given a string, this macro produces true if the passage has ever been visited during this game, and false otherwise.

For example, you can put the name of a passage after visited. The hook after it will only be visible if you have visited that named passage.

(if: (visited: "This is the first option."))[ [[This link is only visible if you already viewed the first option passage.->Secret]] ]

The example above basically says, “If you have visited the passage named “This is the first option,” then this passage will show a link with the text “This link is only visible if you already viewed the first option passage.” that links to the passage named Secret.

This is the full text of the intro passage in the example above.

This is a test to show how to hide something until other content is visited. 

[[This is the first option.]]

(if: (visited: "This is the first option."))[ [[This link is only visible if you already viewed the first option passage.->Secret]] ]

(if: (visited: "This is the first option.") and (visited: "Secret"))[ [[This is the super secret text->Super Secret]] ]