# 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"
```


---

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