"Conditional Statements": SugarCube (v2.18)#
Summary#
In SugarCube, the <<if>>
and <<else>>
macros conditionally run sections. If the statement is true, the <<if>>
section will be run. Otherwise, the <<else>>
section will be.
Example#
Twee Code#
:: StoryTitle
Conditional Statements in SugarCube
:: Start
<<set $animal to "horse">>
<<if $animal is "dog">>
It's a dog!
<<else>>
It's a horse!
<</if>>