-
Notifications
You must be signed in to change notification settings - Fork 8
3.X Commands
A Rumor script is composed of multiple statements, a statement is a line in a Rumor script, and every statement in Rumor starts with a command. This is a list of commands that are available in Rumor:
$ [expression]
Used to execute expressions.
add (character) [expression]
Adds dialog with the contents of expression
spoken by character
. If
character
is not specified, then the default speaker (typically the narrator)
is used instead. The character can only be specified using a variable; it
cannot be specified using another expression.
call [expression]
Moves execution to the label with the name expression
and then returns
execution back after all of the label's children have been executed. Works
similar to a function call.
choice [expression]:
Adds a choice to the stage with the contents of expression
. Any indented
children directly after this command will be treated as the dialog to use if
this choice is selected.
choose
Pauses execution until a choice is picked.
clear (dialog|choices)
If neither dialog
or choices
is specified, clears the dialog and choices from the stage.
If dialog
is specified, the dialog is cleared from the stage.
If choices
is specified, the choices are cleared from the stage.
elif [expression]:
Can only be used directly after an if or elif statement. Any indented children directly
after this command will be executed if and only if expression
evaluates as
true and the previous if or elif statement(s) evaluated as false.
else:
Can only be used directly after an if or elif statement. Any indented children directly after this command will be executed if and only if the previous if or elif statement(s) evaluated as false.
if [expression]:
Any indented children directly after this command will be executed if and only
if expression
evaluates as true.
jump [expression]
Moves execution to the label with the name expression
.
label [name]:
Marks a location in the script that can be jumped to or called with a name. The name cannot be an expression, must be alphanumeric, and cannot start with a number. Any indented children directly after this command will be considered as part of this label.
pause (expression)
Pauses execution for expression
seconds and then auto-advances. If
expression
is not provided or it does not evaluate to a number, then
execution is paused instead until the stage is manually advanced.
return
Stops execution. If this return statement is encountered after a call
, then
execution is returned to the call
statement.
say (character) [expression]
Clears the stage and replaces it with dialog with the contents of expression
spoken by character
. If character
is not specified, then the default speaker
is used instead.