Name | Topic | Used in | Type |
---|---|---|---|
if | Branching | station | element |
The if-element lets you check states. It wraps the content (like text and choices)
and will only display them the expression it holds is true.
You can use multiple if-elements (the first that's true will be chosen).
At the end of a station using "if", you must use "else".
At the end of a station using "if", you must use "else".
Sample:
<if check="[has torch]">
<text>Your torch lightens up the room.
You notice a small rusty shield
lying on the floor and pick it up.
</text>
<state name="has shield"/>
<choice station="back">You leave the room</choice>
</if>
<else>
<text>This room is too dark to see anything.</text>
<choice station="back">You leave it</choice>
</else>
Attributes: check