Using alternatives
In Chapter 2, Knots, Diverts, and Looping Patterns, the use of opening, {
, and closing, }
, curly brackets signaled the use of a conditional option. Between using labels and conditions, options could become dynamic and react to the reader making choices between loops. However, curly brackets are used for more than conditional options. In ink, they also signal the use of any code, and one of the most common forms of code is the use of an alternative. Used to create different text effects and react to loops, alternatives separate each of their elements by a vertical bar, |
. Depending on the type of alternative used, different text effects can happen.
Sequences
The first and default alternative is a sequence. As its name might suggest, a sequence is a series of values. They are accessed based on their name, in sequence:
Example 1:
It was a {dark and stormy night|bright and shining day}.
In Example 1, a sequence is used. It has two elements, dark and stormy...