QML - Create Your Own Adventure

Name Topic Used in Type
check Branching if attribute
This attribute holds the boolean expression of the state and can contain numbers/ strings. For example, "([dice] = 10 or [dice] = 12) and not [has beer]" is a valid check. Note that the characters "<" and ">" to compare numbers should be replaced by "lower" and "greater". Optionally, you can use "equal" instead of "=". Example: "[dice] above 3".
<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>