Gameplay: Variables, rewards and reusable logic
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.
SetVariable()#
Set Variable
Assign a value to a runtime game variable. This replaces its previous value and can create the runtime entry if it does not exist.
| Option key / field | Meaning and input | Default |
|---|---|---|
| Variable name | Choose a game variable name. Custom values are accepted. | Blank |
| Value value | A value of the type required by the selected variable, operation or property. | true |
Timing. Waits for the runtime routine to return; no further completion wait is promised by this schema.
await SetVariable({"name": "powered", "value": 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.
