Skip to reading
Action Lists & Events

Variables, rewards and reusable logic

Edition 0.86.4.3

0.86.4.3 edition with revised lessons, updated cross-references and new cinematic/camera-safety supplements. Earlier examples, screenshots and registry figures retain their stated edition context.

Download PDFView PDF page
On this page

Keep puzzle facts in variables, then use a visual or text script when a decision is needed. A list is an ordered set of instructions; it does not gain a branch just because an action returns false.

Set Variable#

ID: SetVariable | Shared list / GUI · Visual graph · Text action wrapper · Timeline

Assign a value to a runtime game variable. This replaces its previous value and can create the runtime entry if it does not exist.

Source table from Variables, rewards and reusable logic, page 62
Field / stored keyWhat to enterStarting value
Variable nameChoose a game variable name. Custom values are accepted.Blank
Value valueA value of the type required by the selected variable, operation or property.true

In use. Set powered to true when the lever is used. Use a Boolean value, not the text "true". In the room/object inspector, choose Change Variable with Operation set to Set instead.

Create Variable#

ID: CreateVariable | Native inspector · Shared list / GUI · Visual graph · Text action wrapper

Create a variable only when that name is absent. It is an initializer, so calling it again does not reset an existing value.

Source table from Variables, rewards and reusable logic, page 62
Field / stored keyWhat to enterStarting value
Variable ID nameText.Blank
Type variableTypeChoose: string, boolean, number, array."string"
Initial Value valueA value of the type required by the selected variable, operation or property.Blank

In use. Create visits with a numeric value of 0, then increment it on room entry. Define long-lived puzzle variables in the Variable Designer so their starting values are easy to find. The variableType field is descriptive; do not rely on it to convert bad input.

Page 62 of 189Permalink
Go to page