# How to Create a State Machine

There two ways creating a State Machine with VSM:

* Right click in the **Scene** and select **Ilumisoft->State Machine**\ <br>

  <figure><img src="https://3979764177-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MCgKLjperRFhHlR4O0p%2Fuploads%2FBFpcLZMREdm24fi1X0KD%2Fimage.png?alt=media&#x26;token=0d0d3357-ba0b-4386-883a-f507762bf25b" alt=""><figcaption></figcaption></figure>
* Select the **GameObject** you want to add a State Machine to in the inspector and add the **StateMachine** component to it via **Add Component**


---

# 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://ilumisoft.gitbook.io/visual-state-machine/get-started/create-a-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.
