On Runner Variable Change

Triggered when a State Machine Runner variable changes

Executed when the State Machine Runner Variable is modified.

Description

This event fires whenever a variable on a specific State Machine Runner is changed. Use this to react to per-instance state changes.

Parameters

Name
Description

Variable

The variable to monitor for changes

Runner

The target GameObject containing the State Machine Runner

Keywords

Variable, Change, State Machine, Runner

Example

Trigger Component:
โ”œโ”€ Event: On State Machine Runner Variable Change
โ”‚   โ”œโ”€ Variable: "Health"
โ”‚   โ””โ”€ Runner: Self
โ””โ”€ Actions:
    โ”œโ”€ Update health bar UI
    โ””โ”€ Play damage effect if health decreased

The Runner parameter is typically set to Self to monitor the runner on the same GameObject as the Trigger.

Last updated

Was this helpful?