ChangeVariable()
Change Variable
Set or modify a variable using set, arithmetic, append or toggle. The operation determines how Value is used.
| Option key / field | Meaning and input | Default |
|---|---|---|
| Variable name | Choose a game variable name. | Blank |
| Operation operation | Choose: set, add, subtract, multiply, divide, append, toggle. | "set" |
| 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 ChangeVariable({"name": "powered", "operation": "set", "value": true})In use. Choose score, Add, 5 for a five-point reward. Toggle suits a repeatable switch; Set is safer when an event may run twice. Keep arithmetic numeric and avoid dividing by zero.
AddScore()#
Add Score
Increase the runtime variable named score by the given integer amount.
| Option key / field | Meaning and input | Default |
|---|---|---|
| Amount amount | Number of points to add to score. | 1 |
Timing. Waits for the runtime routine to return; no further completion wait is promised by this schema.
await AddScore({"amount": 1})In use. Award 5 after collecting a unique key. This action does not remember that the key was already collected. Put it behind the same one-time condition as the reward. In a native inspector, Change Variable / score / Add is the direct equivalent.
