@ Label

Story markers and routing points

Labels are markers in specific points of your script flow. They are used as routing points to navigate from one point of the script to another, creating story branches and story flow control.

The label name must be a static name with no variables or text replacements that can alter it during runtime.

A Label statement starts with an @ (At Sign), immediately followed by a whitespace.

As written in the example above, all statements below the declaration of a label belong to that label section until another label is declared.

Label as Instruction

Any statement can be labeled by adding a label as instruction to it. Router statements can use these labels as any other label statement.

It's important to notice that statements can be jumped if they belong to a label statement with a false condition or when they are within a condition statement that is also false. When a router statement points to a label instruction, the flow goes to that point, ignoring any parenting condition and evaluating only the target statement condition, if any.

Display Name

When naming labels, it's common to emerge project patterns that are often non-friendly, containing dots, slashes, prefixes, postfixes, and other marks.

If your project shows labels' names to users for some reason, like in some kinds of story trackers or even in Script Nodes, these names are not ideal to be displayed to other developers or players.

You can type a free text line below your label declaration to add a user-friendly name.

Differently from the label declaration itself, which must be a static name, a display name can use variables, replacements, rich text tags, and be formatted or modified by custom code.

Last updated