# State Machine

Keep things clean and organize your triggers, actions and conditions in a simple State Machine, easily re-use them with any type of game object.

## Key Features

* **Node-Based Graph** which works and looks the same way as the Animator editor graph.
* Re-use **State Machines** for any type of logic Game Modes, AI, Player Managers etc.
* Add as many **transitions** to any node and add conditions to them.
* **Mute** transitions.
* **Copy & Paste** nodes between **State Machines.**
* **Duplicate** State Machines.
* Add as many **Sub-State Machines** as you need.
* **Drag & Drop** state machines inside other SM's to create Sub-State Machines.
* **Easily export** State Machines to share between projects or to other users.
* Use any type of **triggers, actions** and **conditions** inside a State Machine.
* **Works** with any other official or un-official Game Creator **modules**.
* **Live Debug** runtime states right in the Editor.

## Setup

Download the package from the the [**Unity Asset Store**](https://bit.ly/3kiVICw). You'll first need to have [**Game Creator**](https://www.assetstore.unity3d.com/en/#!/content/89443) installed.

Then, bring up the *Modules Window* clicking on the Game Creator option in the toolbar. Click the **State Machine** Module **Enable** button.

{% hint style="danger" %}
This module requires [**Game Creator**](https://www.assetstore.unity3d.com/en/#!/content/89443) and won't work without it. Don't attempt to extract the package inside the Plugins/ folder as it will throw errors.
{% 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-1/state-machine.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.
