This macro is used to check if a variable or value is true or false, and defines what will happen if after the check.
Harlowe:
Alice picks up the teacup {
(if: $teacup is 'blue')[
and notices a Dormouse, fast asleep inside of it.
] (else:)[
and takes a long sip.
]}.
SugarCube:
Alice picks up the teacup
<<if $teacup is "blue">>
and notices a Dormouse, fast asleep inside of it.
<<else>>
and takes a long sip.
<</if>>
display
The display macro is perfect for when a section of text needs to be repeated multiple times throughout your story.
For example, if Alice is lost in the forest, you might want to repeat descriptions to indicate that Alice has already tried walking down a specific path.
First, you would create a separate passage in Twine with the name "Path". Write your description in the passage. Then, back in your "Forest" passage, you would write something like this:
Harlowe:
Alice walks down the path on the right.
(display: "Path")
The macro will be replaced with the text from the "Path" passage.
include
Similar to Harlowe's display macro, this macro displays the contents of the passage with the given name.
SugarCube:
Alice walks down the path on the right.
<<include "Path">>