--- namespace: global state: boolVar: true var: 1 name: NoName THREE: 3 FOUR: 4 $passage.visited: 0 $passage.exited: 0 commands: $character.Wave: { amount: 0 } TestBool: { bool: true } characters: Alice: onEnter: set: $passage.visited +: 1 onExit: set: $passage.exited +: 1 --- Start: - TestBool: { bool: not $boolVar } - Alice: Test - Alice.Wave: { amount: $var } # $var = 1 - set: { $var: 2 } # tests - Alice.Wave: { amount: $var } # $var = 2 - set: $var -: $THREE - 1 - Alice.Wave: { amount: $var } # $var = 0 - if $var != 0: - Alice: $var geq 0 - choices: choice1 text: Choice1 choice2 text: Choice2 else: - Alice: $var neq 0 - choices: choice1 text: Choice1 choice2 text: Choice2 - input: $name: What's your name? - set: $var: $FOUR - if $var > $THREE: - var > $THREE - if $var > 3 and $var < 5: - 3 < var < 5 - Alice: Visited Choice1 $Choice1.visited times. - Exited Choice1 $Choice1.exited times. - Exited Choice1Intermediate $Choice1Intermediate.exited times. - 3 + 4 = {$THREE + $FOUR} - choices: if $Choice1.exited > 0: { choice1 text: Choice1 } if $Choice2.exited > 0: { choice2 text: Choice2 } Choice1: - Alice: Choice1 - call: Choice1Intermediate Choice1Intermediate: - return: Choice2: - Alice: Choice2 Default: - Alice: default