0 votes
by (120 points)
edited by
Hello, I'm new to Twine and I'm using it for an assignment for my Digifiction module.

I'm trying to link a passage to an (if:) macro and I have no idea how (or is it not possible?). The result is supposed to be if the player chooses this certain route, which leads to this certain passage, a different text shows up.

Thank you :)

1 Answer

0 votes
by (159k points)

Generally you would use a story variable to track if something has occured or not, and then later use the current value of that story variable to determine what to show the reader.

1. Initialising the staor variable to it's default value in your project's startup tagged special passage.

(set: $visitedLibrary to false)

2. Player visited the Library.

(set: $visitedLibrary to true)

3. Determine what to show to the reader based on the current value of the story variable.

(if: $visitedLibrary)[The library was visited]\
(else:)[The library hasn't been visited yet.]

see(set:) macro(if:) macroboolean data-type.