QML - Create Your Own Adventure

Name Topic Used in Type
else Branching station element
Whenever you test against a state with the if-element, you need to write an alternative display in case no if-expression of a station turns out to be true. Therefore, whenever you write one or more if-elements to a station, you need to put a single else-element at the end of the station.
<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.

   <state name="has shield"/>
   <choice station="back">You leave the room</choice>
   <text>This room is too dark to see anything.</text>
   <choice station="back">You leave it</choice>