Commands¶
The commands are special instructions surrounded with double angle-brackets: <<stop>>
. There
are both built-in and user-defined commands.
The built-in commands are those that are supported by the YarnSpinner runtime itself. Typically they would alter the execution of the dialogue, or perform a similar dialogue-related function. The full list of such commands is given below.
The user-defined commands are those that you yourself create and then use within your yarn scripts. For a full description of these commands, see the document on user-defined commands.
Built-in commands¶
Variables¶
- <<character>>
Declares a character (person).
- <<declare>>
Declares a global variable.
- <<local>>
Declares a local variable.
- <<set>>
Updates the value of a variable (either local or global).
Control flow¶
- <<if>>
Conditionally executes certain statements. This is equivalent to the if keyword in most programming languages.
- <<jump>>
Switches execution to another node.
- <<stop>>
Stops executing the current node.
- <<visit>>
Temporarily jumps to another node, and then comes back.
- <<wait>>
Pauses the dialogue for the specified amount of time.