# Run Node with Variables

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".

{% hint style="success" %}
Use this instruction when you need to pass context-specific data to a state machine, such as who triggered an event or what values to use.
{% endhint %}

{% hint style="info" %}
If the target has a **State Machine Runner Instances** component, it will automatically find the correct runner for the specified State Machine.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ninjutsugames.com/game-creator-2/state-machine-2/visual-scripting/instructions/run-node-with-variables.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
