#
Router
Routers are navigation controllers to move from one point of the story to a given label, by name. Its main functionality is control where the story should move to, based on player choices, variable values, and custom code.
- A Router statement starts with a -> (Dash and Greater Than), immediately followed by a space.
-> Finish
// This label is jumped.
@ Story
// The script flow moves to this label.
@ Finish
#
Router as Instruction
A Router can also be concatenated to other statements and used as an instruction.
In Dialogue, Label, Command, and Other Router statements, a router instruction is executed only if the statement conditions fail.
$ courage = 1
- Alice | ? {courage} >= 5 | -> Flee
I will fight
$ x = 1
@ Mylabel | ? {x} == 0 | -> MyOtherLabel
$ move = off
-> Mylabel | ? {move} == on | -> MyOtherLabel
$ coins = 25
$ End | ? {coins} >= 50 | -> Pay
In Option statements, a router instruction is executed when that option is selected.
- .
You're flanked.
* Be brave and stay | -> Fight
* Be cautious and try to leave | -> Flee