> For the complete documentation index, see [llms.txt](https://docs.ninjutsugames.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ninjutsugames.com/game-creator-2/state-machine-2/visual-scripting/instructions.md).

# Instructions

Instructions are actions you can use in Game Creator 2 Actions, Hotspots, or any other visual scripting context to control state machines.

## Runner Instructions

These instructions work with **State Machine Runner** components on specific GameObjects, affecting only that instance.

| Instruction                                                                                                                    | Description                                                  |
| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------ |
| [**Run State Machine Runner Node**](/game-creator-2/state-machine-2/visual-scripting/instructions/run-node.md)                 | Executes a specific node on a target runner                  |
| [**Run Runner Node with Variables**](/game-creator-2/state-machine-2/visual-scripting/instructions/run-node-with-variables.md) | Executes a node and passes variable values before execution  |
| [**Enable State Machine Runner Node**](/game-creator-2/state-machine-2/visual-scripting/instructions/enable-node.md)           | Re-enables a previously disabled node                        |
| [**Disable State Machine Runner Node**](/game-creator-2/state-machine-2/visual-scripting/instructions/disable-node.md)         | Disables a node, preventing it from executing                |
| [**Stop State Machine Runner Node**](/game-creator-2/state-machine-2/visual-scripting/instructions/stop-node.md)               | Immediately stops a currently running node                   |
| [**Loop List with Node**](/game-creator-2/state-machine-2/visual-scripting/instructions/loop-list-with-node.md)                | Iterates through a list and executes a node for each element |

{% hint style="info" %}
**Runner Instructions** affect only the specific runner instance on the target GameObject. Use these for per-instance control.
{% endhint %}

## Asset Instructions

These instructions work directly with **State Machine Asset** files, affecting all runners using that asset.

| Instruction                                                                                                       | Description                                       |
| ----------------------------------------------------------------------------------------------------------------- | ------------------------------------------------- |
| [**Run State Machine Node**](/game-creator-2/state-machine-2/visual-scripting/instructions/run-node-1.md)         | Executes a node directly on a State Machine asset |
| [**Enable State Machine Node**](/game-creator-2/state-machine-2/visual-scripting/instructions/enable-node-1.md)   | Enables a node in the State Machine asset         |
| [**Disable State Machine Node**](/game-creator-2/state-machine-2/visual-scripting/instructions/disable-node-1.md) | Disables a node in the State Machine asset        |
| [**Stop State Machine Node**](/game-creator-2/state-machine-2/visual-scripting/instructions/stop-node-1.md)       | Stops a running node in the State Machine asset   |

{% hint style="warning" %}
**Asset Instructions** affect **all runners** using that State Machine asset. Use with caution in multiplayer or when multiple instances exist.
{% endhint %}

## Usage Example

```
Actions Component:
├─ Instruction: Run State Machine Runner Node
│   ├─ Target: Player (GameObject)
│   └─ Node: "CombatNode"
└─ Instruction: Enable State Machine Runner Node
    ├─ Target: Enemy (GameObject)
    └─ Node: "AlertNode"
```
