Run Node with Variables

Executes a node and passes variable values to the runner

Executes a State Machine node from a specific target runner with variables.

Description

This instruction sets variable values on the State Machine Runner before executing a node. This is useful for passing data to the state machine, such as targets, damage values, or other parameters.

Parameters

Name
Description

Target

The target GameObject that contains the State Machine Runner

Variables

List of variable name-value pairs to set before execution

Keywords

Execute, Call, Instruction, Action, State Machine, Run

Example

Actions Component:
โ””โ”€ Run Runner Node with Variables
    โ”œโ”€ Target: Enemy
    โ”œโ”€ Variables:
    โ”‚   โ”œโ”€ DamageAmount: 25
    โ”‚   โ””โ”€ Attacker: Player
    โ””โ”€ Node: "TakeDamageNode"

This sets DamageAmount and Attacker variables on the Enemy runner, then executes "TakeDamageNode".

If the target has a State Machine Runner Instances component, it will automatically find the correct runner for the specified State Machine.

Last updated

Was this helpful?