CreateVariable()
Create Variable
Create a variable only when that name is absent. It is an initializer, so calling it again does not reset an existing value.
| Option key / field | Meaning and input | Default |
|---|---|---|
| Variable ID name | Text. | Blank |
| Type variableType | Choose: string, boolean, number, array. | "string" |
| Initial Value value | A value of the type required by the selected variable, operation or property. | Blank |
Timing. Waits for the runtime routine to return; no further completion wait is promised by this schema.
await CreateVariable({"name": "powered", "variableType": "boolean", "value": true})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.
