Variable actions
7 actions in the Variable category. Each block mirrors how the action appears in the editor's sidebar.
Add To Value
Adds an amount to a variable or property, accumulating the result each time it runs.
| Input | Type | Default | Description |
|---|---|---|---|
| Target | Variant | - | The variable or property to add to. |
| Amount | Variant | 1 | The amount to add each time. |
Adjust Value
Changes a variable by an amount and keeps the result within Min and Max. This is the one-step way to spend, damage or heal without letting a value run past zero or a cap.
| Input | Type | Default | Description |
|---|---|---|---|
| Target | Variant | - | The variable or property to change. |
| Operator | String | '+' | How the amount changes the value. |
| Amount | Variant | 1 | How much to change it by. |
| Min | Variant | 0 | The lowest the result may reach. |
| Max | Variant | 100 | The highest the result may reach. |
Approach
Moves a number toward a target value at a fixed speed, without overshooting.
| Input | Type | Default | Description |
|---|---|---|---|
| Target | Variant | - | The variable or property to move. |
| To | float | 0.0 | The value to move toward. |
| Step | float | 1.0 | How fast to move, in units per second. |
| Branch | Goes to |
|---|---|
| Reached | Where to go on the frame the number lands on the target value. |
| Going | Where to go while the number is still short of the target value. |
Lerp Toward
Smoothly eases a variable or property toward a target value each frame. It keeps getting closer without ever landing exactly, so use Is Near to tell that it arrived.
| Input | Type | Default | Description |
|---|---|---|---|
| Target | Variant | - | The variable or property to ease. |
| To | Variant | 0 | The value to ease toward. |
| Weight | float | 0.1 | How much to move each call, from 0 to 1. Higher is faster. |
Set Value
Sets a variable or property to a value.
| Input | Type | Default | Description |
|---|---|---|---|
| Target | Variant | - | The variable or property to write to. |
| Value | Variant | 0 | The value to store. |
Spring To
Eases a number toward a target like a spring, so it overshoots and settles instead of gliding in. Stiffness pulls harder and Damping bleeds off the bounce. It settles without landing exactly, so use Is Near to tell that it arrived.
| Input | Type | Default | Description |
|---|---|---|---|
| Target | Variant | - | The number the spring moves and stores back into. |
| To | Variant | 0.0 | The value the spring settles at. |
| Stiffness | float | 150.0 | How hard the spring pulls toward To. |
| Damping | float | 10.0 | How fast the bounce dies down. |
Toggle Value
Flips a boolean variable or property between true and false.
| Input | Type | Default | Description |
|---|---|---|---|
| Target | Variant | - | The boolean variable or property to flip. |