> ## Documentation Index
> Fetch the complete documentation index at: https://wizardmachine.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Create your first WizardMachine script and run it on an entity.

This quickstart walks you through creating a script, attaching it to an entity, and running it in Play mode.

## Prerequisites

Before you begin, make sure you have:

* **WizardMachine** installed from the [Microsoft Store](https://apps.microsoft.com/detail/9nvdpg63kq7n).
* A code editor. This guide uses **Visual Studio Code**.
* The **WIZMEXT** VS Code extension, for syntax highlighting and code completion.

## Create and run your first script

<Steps>
  <Step title="Create a script">
    In the **Content Browser**, select **+ Add > New Script** and name it `hello`. WizardMachine creates a `hello.wscript` file containing a behaviour class named after the file, with empty `Start` and `Update` methods.
  </Step>

  <Step title="Open the script">
    Open `hello.wscript` in Visual Studio Code.
  </Step>

  <Step title="Write your behaviour">
    Replace the contents with the following and save the file:

    ```cpp theme={null}
        // hello.wscript

        class hello
        {
            string greeting = "Hello";

            void Start() {
                log_info(greeting + " from " + self().get_name());
            }

            void Update(float delta_time) {
                // Spin the entity 45 degrees per second around its Y axis.
                self().add_rotation(0.0f, 45.0f * delta_time, 0.0f);
            }
        }
    ```

    `Start` runs once before the first update, and `Update` runs every frame.
  </Step>

  <Step title="Add a Scripting component">
    Select the entity you want to drive, then add a **Scripting** component from the **Add Component** menu.
  </Step>

  <Step title="Assign the script">
    Assign `hello` to the Scripting component. The class's public fields, such as `greeting`, appear underneath it, where you can change them for this entity.
  </Step>

  <Step title="Enter Play mode">
    Start the game. The entity spins, and the greeting is written to the log. Press **Stop** or `Escape` to end the session and restore the level to its pre-play state.
  </Step>
</Steps>

## Next steps

<Card title="Scripting reference" icon="code" href="/scripting">
  Explore the full entity API, input, physics, UI, and save data.
</Card>

<Tip>
  Need help? Reach out at [sebastianrautenbachwork@gmail.com](mailto:sebastianrautenbachwork@gmail.com).
</Tip>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.