# State Machine 2

{% hint style="danger" %}
**Having troubles?** Join our channel in Game Creator's [**Discord server**](https://discord.com/invite/99bbWBzKDX) for realtime discussions.
{% endhint %}

This module allows to create state machines with [Game Creator 2](https://assetstore.unity.com/packages/tools/game-toolkits/game-creator-2-203069).\
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.

{% embed url="<https://youtu.be/NFub2Fv-GZc>" %}

## Key features <a href="#key-features" id="key-features"></a>

* Node-Based Graph with amazing performance.
* Multiple types of Nodes (Triggers, Actions, Branch, Conditions, Sub-StateMachine)
* Re-use State Machines for any type of logic Game Modes, AI, Player Managers etc.
* Variables from all types for State Machine asset and Runner.
* Disable or Lock nodes
* MiniMap to easily navigate through the graph
* Group nodes
* Add Sticky Notes
* Easily Align Nodes
* Tons of Shortcuts
* Complete undo support
* Copy & Paste nodes between State Machines.
* Drag & Drop regular GC Actions, Conditions and Triggers to a StateMachine to easily port your previous work.
* 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.
* Compatible with all modules.

{% hint style="success" %}
All actions and conditions are compatible with other Game Creator modules.
{% endhint %}

## Setup <a href="#setup" id="setup"></a>

You'll first need to have Game Creator 2 installed.

The process is simple:

1. Install [**Game Creator 2**](https://assetstore.unity.com/packages/tools/game-toolkits/game-creator-2-203069)
2. Install [**State Machine 2**](https://u3d.as/32Gh)

Finally bring up the ***Game Creator Install Window*** select the **State Machine 2** package and install it.

<figure><img src="https://3895715781-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LDchaEIEhpBAh2gCe06%2Fuploads%2Fgit-blob-b7bc8a1812ba09a2bb71ad8ca5442485dcf19bac%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

{% hint style="danger" %}
This module requires [**Game Creator 2**](https://assetstore.unity.com/packages/tools/game-toolkits/game-creator-2-203069) and won't work without it. Don't attempt to extract the package inside the Plugins/ folder as it will throw some errors.
{% endhint %}
