Detecting and changing options
Knots and stitches are not the only ink concept capable of looping—options can do so as well. They also have the unique ability to detect when they are part of looping structures. These special types of options are named labeled options. They create an ability to give a label to an option and track if it has been seen before in the story. Labels are also an example of a variable: a value changed as part of the story by code.
The use of labeled options enables us to use the second type of option: conditional options. As with their labeled sisters, conditional options are part of the option, but they do not track loops. Instead, they conditionally show the option. If the comparison is true
, the option is shown. If it is not, the option is hidden.
Labeled and conditional options
Labeled options are created using open and closing parentheses around a name after the symbol for a choice, a plus sign (+
) or asterisk (*
), and the text of the choice...