# Presets

## What are Presets?

Use the Presets tool to save the properties you have applied to one or more objects such as position, logic, and more to speed up your build time or spawn customised logic during live gameplay.

* **Play Mode** - **Spawn** or **Replace** Assets or **Presets**
* **Builder Mode** - **Place Presets** of repeat use objects or groups of objects with specific logic applied and 3D orientation for custom outcomes

**Presets can be:**

* Single Object
* Multi Object
* Parent and Child Objects

{% hint style="info" %}
Presets may be nested to include other Presets as part of their setup.
{% endhint %}

**Examples:**

* Enemy camp setups for repeated use in your Experience
* Nested presets with item drops when parent objects are destroyed

## Manage Presets

{% tabs %}
{% tab title="About" %}
{% embed url="<https://youtu.be/Tes-SfuQk74>" %}
{% endtab %}

{% tab title="Open" %}
Open the Library (Press the **L** key). Click **Presets** in the Elements filter on the left side. If the Preset includes multiple objects without a Parent, it will have a white icon.

![](/files/enTTxMSwRNSjZzEtjnYv)

{% hint style="info" %}
Presets can be added to the Toolbar or placed in an Experience like any Object, but will keep the settings you saved.
{% endhint %}

{% hint style="warning" %}
It is a known issue that Presets may not preserve Parent/Child relationships in Game Maker 0.8 during gameplay. Test thoroughly.
{% endhint %}
{% endtab %}

{% tab title="Create" %}

1. Place an Object and open the **Properties Panel**.
2. Apply Behaviors and Components, customising the Object's parameters as you like.
3. Save the Preset using the Presets button or the ≡ menu in the Hierarchy.\
   A **pop-up window** will display existing Presets you have made and the option to create a new Preset. Click **Create New** and give the Preset a name, then click Done.

{% hint style="info" %}
To save **a Preset from multiple Objects**, select all of them and proceed to step 3 to save as a single Preset.
{% endhint %}

{% hint style="info" %}
To save **a Preset from a Parent Object** and preserve its relationship with its Child Objects, select the parent Object in the Hierarchy or using the Presets button and save it as a single Preset.

**Note:** With Game Maker 0.8 it is a known issue that Parent/Child relationships may not be preserved when spawned during live gameplay (for example, when picking up the Parent, the Child Object(s) may not follow. Test thoroughly to ensure you've achieved the desired functionality.
{% endhint %}

**Example:**

This Preset is an enemy that drops a coin when defeated.

1. Place Object.

<figure><img src="/files/aS2sdE6eAaJULJDafzVf" alt=""><figcaption></figcaption></figure>

2. Apply **Melee Enemy Behaviour** and customise parameters.

<figure><img src="/files/V6AWJ9qlDDfJ0qT5farj" alt=""><figcaption><p>Choose <strong>Melee Enemy</strong> Behaviour</p></figcaption></figure>

{% hint style="info" %}
Melee Enemy Behaviour also adds a Health Component to the Object so it can be defeated.
{% endhint %}

<figure><img src="/files/OMVQzvUXE2RiYl13vFfw" alt=""><figcaption><p>Add a <strong>Drop Component</strong>, select an <em><mark style="color:green;">Asset to Spawn</mark>,</em> leave the <em><mark style="color:green;">Drop Condition</mark></em> as death, and add a <strong>Collectible Component</strong> to the <mark style="color:green;">Spawned Asset</mark>.</p></figcaption></figure>

3. ![](/files/tgLRZb0TfcVVELqDH9yP) Save Preset.

<figure><img src="/files/Byt0iregRkZ13zS8DjUZ" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Delete" %}
Open the **Library**, find the desired Preset, **right-click** on it and choose **Delete**.

<figure><img src="/files/YwV2lZnjGMkvbjtFRj4w" alt=""><figcaption><p>Delete a Preset</p></figcaption></figure>

{% hint style="warning" %}
Any Objects in your Experience that were set to spawn a Preset you have deleted will not spawn anything.
{% endhint %}
{% endtab %}

{% tab title="Update" %}
{% hint style="info" %}
Use this workflow to:

* Modify settings on Objects included in your Preset
* Substitute an Object in your Preset with a new one
  {% endhint %}

{% hint style="warning" %}
This method overwrites the previous version of your Preset. If you think you will need it again, make a duplicate before updating.
{% endhint %}

1. Place the desired Preset in the Experience.
2. Make the desired changes to an Object's Properties or substitute with a different Object.
3. Select the Object(s) to include in the new version of the Preset. Press the Presets button or the ≡ menu in the Hierarchy (like saving a Preset) and choose **Replace Preset**.
4. Select the Preset you want to replace, type a new name, and press Done.\
   The Preset's new name, new Object(s), and Properties, will be reflected in the Library and locations the previous Preset had been set to be spawned.

<figure><img src="/files/J3e36rfrsbec3RiylsYc" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
All changes, including the name of the Preset, will be updated in the Library and anywhere a Preset has been used (Asset Spawner Behaviour, Replace Asset Behaviour, Drop Component, etc).
{% endhint %}

{% hint style="warning" %}
Updating a Preset will **NOT** update every instance where it was placed in your Experience. To do that, use the Hierarchy's ≡ menu and select **Replace with Preset**.
{% endhint %}
{% endtab %}

{% tab title="Replace With" %}
{% hint style="info" %}
Updating a Preset does NOT change instances where you have placed it in the Experience, only how it will be spawned from other Objects.
{% endhint %}

{% hint style="success" %}
You can use this process to replace a placeholder Object while you create custom art for your Experience. Placeholders are great for testing logic while final art is being made.
{% endhint %}

1. Open the Hierarchy and select the Object you want to replace.
2. Open the ≡ menu for the Object and choose **Replace with Preset**.

![](/files/JcdNUFMY9n1Xa9r461ai)

3. Select the Preset you want to use from the popup window and click Done.\
   The original Object will be replaced by the chosen Preset.

<figure><img src="/files/GsNwTMyDLEcRzX4LJAZQ" alt=""><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}

## Spawn Presets During Gameplay

{% hint style="info" %}
During live gameplay, some logic allows you to spawn Objects with limited default settings or spawn Presets with customised settings.
{% endhint %}

1. Select an Asset that will spawn a Preset.
2. Apply a Behaviour or Component that will use a Preset during play mode and click on the appropriate parameter to open the Presets popup window:

* Asset Spawner Behaviour - *<mark style="color:green;">Asset to Spawn</mark>*
* Replace Asset Behaviour - *<mark style="color:green;">Replace By</mark>*
* Drop Component - *<mark style="color:green;">Preset</mark>*

3. Select the Preset you want to use and click Done.

**Example:**

This logic setup spawns a Preset Skeleton Warrior when a crate Object has been destroyed.

Below, a Health Component has been added to the crate so it can be destroyed and a Drop Component has been added with a Skeleton Warrior Preset applied in the Preset parameter.

The Skeleton Warrior Preset used includes dropping a collectable coin when it is defeated.

<figure><img src="/files/ThImzhR60OHexYxPvfaP" alt=""><figcaption></figcaption></figure>

### Nest Presets for Multiple Layers of Spawning

Use the same Behaviors and Components to replace Objects with Presets, Spawn Presets, and Drop Presets. Save these in a new Preset and you have nesting Presets that will be spawned during the game.\
\
**Example:**

The logic setup below spawns a Preset Skeleton Warrior when a crate Object has been destroyed, and when the Skeleton Warrior is defeated, a rotating Magic Coin Preset is dropped.

{% tabs %}
{% tab title="Step 1" %}

1. Create a new Preset called Magic Coin with **Bird Behaviour**. This adds a slight rotation to the coin.

<figure><img src="/files/aob1gFybV4OGDsY1x8c5" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Step 2" %}
2\. Update the Skeleton Warrior Preset's **Drop Component** and select the *<mark style="color:green;">Preset</mark>* to spawn as Magic Coin. This spawns the Magic Coin Preset when the defeat condition is met in the Skeleton Warrior Preset.

<figure><img src="/files/NOGc8OGQD71vdHfH44zZ" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Step 3" %}
3\. Another layer is added when a crate Preset uses the Drop Component and the Skeleton Warrior is selected as the Preset to drop.

<figure><img src="/files/Rls5HdVA8AhJ7Pm58pyn" alt=""><figcaption></figcaption></figure>

Use the Crate Preset as many times as you like in Builder Mode or set it as an item to spawn in your object logic.
{% endtab %}
{% endtabs %}


---

# 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.sandbox.game/en/creator/game-maker/docs/build-menus/side-bar/presets.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.
