"Conditional Statements": SugarCube (v2.18)


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.

Live Example

Download: Live Example

Twee Code

:: StoryTitle
Conditional Statements in SugarCube

:: Start
<<set $animal to "horse">>

<<if $animal is "dog">>
It's a dog!
It's a horse!

Download: Twee Code

See Also

Setting and Showing Variables

results matching ""

    No results matching ""