# Objectives

{% hint style="warning" %}
**NEW GAME MAKER 0.12 INFO COMING SOON!**\
The new release has a lot of amazing features, some of which impact the details on this page. Check back soon for an update, and in the meantime you can see a summary of all the updates in the [Changelog](https://docs.sandbox.game/en/creator/game-maker/version-notes-and-changelogs/game-maker-0.12).
{% endhint %}

{% hint style="warning" %}
**GAME MAKER 0.11 - OBJECTIVES MIGRATION (Optional)**

Migration to the 0.11 Objectives System is optional. The legacy system will be deprecated later, but is still supported.
{% endhint %}

{% hint style="danger" %}
**MIGRATING OLD QUESTS TO 0.11**

Visit [#objectives-system-port](https://docs.sandbox.game/en/creator/version-notes-and-changelogs/game-maker-0.11/0.11-upgrade-guide#objectives-system-port "mention") in the [0.11-upgrade-guide](https://docs.sandbox.game/en/creator/game-maker/version-notes-and-changelogs/game-maker-0.11/0.11-upgrade-guide "mention") for guidance to update old Experience quests for compatibility with the new Objectives system.
{% endhint %}

{% hint style="success" %}
**CREATING NEW QUESTS IN 0.11**

Visit [#multiplayer-compatible-quests-0.11](https://docs.sandbox.game/en/creator/creative-guides/logic-guide/text-quests-and-icons#multiplayer-compatible-quests-0.11 "mention") in [text-quests-and-icons](https://docs.sandbox.game/en/creator/game-maker/creative-guides/logic-guide/text-quests-and-icons "mention") for new ways to build quests in multiplayer Experiences.
{% endhint %}

## What Are Quests?

Quests are game events that prompt players to take action through descriptive UI and object icons.

{% hint style="info" %}
A quest may be triggered and completed only **ONCE**.
{% endhint %}

<figure><img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FLKnso5ojVVLWvtKm496E%2F63.png?alt=media&#x26;token=b58d10be-0076-4653-ba81-f148a29e0b54" alt=""><figcaption><p>Player Screen: Quest banner (center) and UI (right)</p></figcaption></figure>

{% hint style="info" %}
Quest data is used in [Seasons and Events](https://app.gitbook.com/s/61fllYo416R30LRxku4v/players/seasons-and-events "mention") to track player progression to earn rewards.
{% endhint %}

{% hint style="success" %}
While players can scroll through quests in the UI, it is still more user friendly to limit how many quests can be triggered at a time (4-5 maximum recommended).
{% endhint %}

### Text, Quests & Object Icons

Visit [text-quests-and-icons](https://docs.sandbox.game/en/creator/game-maker/creative-guides/logic-guide/text-quests-and-icons "mention") in the Logic Guide to learn how to set up quests with dialogue and object icons.

<table data-card-size="large" data-view="cards"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><strong>Dialogue Strings</strong></td><td><a data-mention href="behaviours/basic-logic/asker">asker</a> behaviours can be triggered in a sequence for conversations with NPCs and result in quest state changes</td></tr><tr><td><strong>Object Icons for Quests</strong></td><td><a data-mention href="components/display/indicator">indicator</a> component can apply icons for quest givers, receivers, and objectives to make these objects easier to find in the game world</td></tr></tbody></table>

## Communication with Other Logic

#### Legacy Objectives System

<table data-card-size="large" data-view="cards"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><strong>Singleplayer Experiences</strong></td><td><span data-gb-custom-inline data-tag="emoji" data-code="2705">✅</span> SP and MP behaviours and components<br><span data-gb-custom-inline data-tag="emoji" data-code="2705">✅</span> Game Rules</td></tr><tr><td><strong>Multiplayer Experiences</strong></td><td><span data-gb-custom-inline data-tag="emoji" data-code="2705">✅</span> SP behaviours and components<br><span data-gb-custom-inline data-tag="emoji" data-code="274c">❌</span> MP behaviours and components<br><span data-gb-custom-inline data-tag="emoji" data-code="274c">❌</span> Game Rules</td></tr></tbody></table>

#### New Objectives System (0.11)

<table data-card-size="large" data-view="cards"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><strong>Singleplayer Experiences</strong></td><td><span data-gb-custom-inline data-tag="emoji" data-code="2705">✅</span> SP and MP behaviours and components<br><span data-gb-custom-inline data-tag="emoji" data-code="2705">✅</span> Game Rules</td></tr><tr><td><strong>Multiplayer Experiences</strong></td><td><span data-gb-custom-inline data-tag="emoji" data-code="274c">❌</span> SP behaviours and components<br><span data-gb-custom-inline data-tag="emoji" data-code="2705">✅</span> MP behaviours and components<br><span data-gb-custom-inline data-tag="emoji" data-code="2705">✅</span> Game Rules</td></tr></tbody></table>

{% hint style="warning" %}
**GAME MAKER 0.11 - MORE COMMUNICATION OPTIONS**

Objectives now communicate with **Game Rules** and <mark style="color:yellow;">**MP**</mark> behaviors and components.
{% endhint %}

{% hint style="danger" %}
Objectives will **NOT** communicate with <mark style="color:green;">**\[SP]**</mark> behaviours and components in multiplayer.
{% endhint %}

{% hint style="warning" %}
**GAME MAKER 0.11 - PLAYER SOURCE REQUIRED**

:bust\_in\_silhouette: Every message sent to **Objectives** must include **player source** data from *<mark style="color:yellow;">**direct interaction**</mark>* by *<mark style="color:yellow;">**every player**</mark>* who should experience quest triggers. Send via [asker](https://docs.sandbox.game/en/creator/game-maker/docs/behaviours/basic-logic/asker "mention"), [trigger-volume](https://docs.sandbox.game/en/creator/game-maker/docs/components/triggers/trigger-volume "mention"), [button](https://docs.sandbox.game/en/creator/game-maker/docs/components/triggers/button "mention"), etc.

:chains: **Player source** data is sent as long as a chain of logic starts with the correct player(s).

***

:scroll: Trigger **Objectives** with **Rules** criteria (examples):

&#x20;     ⋅ <mark style="color:green;">**Individuals**</mark> (player variables) - No modifications needed (player source already required).

&#x20;   ┋<mark style="color:purple;">**All players**</mark> (global variables) - Make Rules spawn an object for all players to interact (e.g., Trigger Volume).

&#x20;   ∴ <mark style="color:red;">**Teams**</mark> (team variables) - Make Rules teleport team members to interact with a hidden object.
{% endhint %}

***

## Manage Quests

Each quest has its own card and appears in a vertical list. Order can not be changed, but it does not affect when a quest will be triggered.

{% hint style="warning" %}
The Game Maker 0.11 Objectives System update brings a few changes, but nearly identical UI.
{% endhint %}

<figure><img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FAskYkLQ6MMVfZrTMwxbp%2Fimage.png?alt=media&#x26;token=e7b065b5-0b12-451e-a111-f6cbc263e1fe" alt="" width="375"><figcaption><p>Game Maker 0.11 Objectives Window</p></figcaption></figure>

<table data-card-size="large" data-view="cards"><thead><tr><th></th></tr></thead><tbody><tr><td><img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FhqpAvl9cOonZDBI6XKXL%2Fimage.png?alt=media&#x26;token=cee6bae8-993d-478a-8a19-a960bc375ac8" alt=""><br><strong>Add Quest</strong></td></tr><tr><td><img src="https://content.gitbook.com/content/83PS3g9zpWmq73xzlwFn/blobs/nvVBs7b8v9C2J76zoF6I/image.png" alt="" data-size="original"> <br><strong>Delete Quest</strong></td></tr><tr><td><img src="https://content.gitbook.com/content/83PS3g9zpWmq73xzlwFn/blobs/xrmNs7Mqm7KPuSwK3hTi/image.png" alt="" data-size="original"> <br><strong>Collapsed Quest Card</strong></td></tr><tr><td><img src="https://content.gitbook.com/content/83PS3g9zpWmq73xzlwFn/blobs/dTaq2AokTu8hKnZCbJkk/image.png" alt="" data-size="original"> <br><strong>Expanded Quest Card</strong></td></tr></tbody></table>

#### Information for the Player UI

<table data-card-size="large" data-view="cards"><thead><tr><th></th></tr></thead><tbody><tr><td><strong>Quest Name</strong><br><strong>Maximum Characters:</strong> 20<br><img src="https://content.gitbook.com/content/83PS3g9zpWmq73xzlwFn/blobs/c94380qCdhuMcecrT3lM/image.png" alt="" data-size="original"></td></tr><tr><td><strong>Quest Description</strong><br><strong>Maximum Characters:</strong> 160<br><img src="https://content.gitbook.com/content/83PS3g9zpWmq73xzlwFn/blobs/CnnVuMjyt5S4omBUNOhH/image.png" alt=""></td></tr></tbody></table>

***

## Quest States

{% hint style="warning" %}
**GAME MAKER 0.11 - PLAYER SOURCE & MESSAGES IN FOR MULTIPLAYER**

Every message received by Objectives must include player source data to change the quest state for every applicable player.

This note applies to every item <mark style="background-color:orange;">highlighted</mark> below.
{% endhint %}

### 1. Unlock Quest

* [<mark style="background-color:orange;">**Requires Message**</mark>](#user-content-fn-1)[^1] **-** Waits for a specified Message to be unlocked

{% hint style="warning" %}
The Auto Unlock option was removed in Game Maker 0.11. Use the [#onplayerjoin-1](https://docs.sandbox.game/en/creator/game-maker/game-rules/events#onplayerjoin-1 "mention") rule to send the **Required Message** to Objectives.
{% endhint %}

### 2. Launch Quest

* **Auto Launch -** Automatically launches the Quest if it is unlocked
* [<mark style="background-color:orange;">**Requires Message**</mark>](#user-content-fn-1)[^1] **-** Waits for a specified Message to launch if unlocked

### 3. [Quest Type](#quest-types)

The four types of Quests available are **Counter**, **Asset Death**, **Timer**, and [<mark style="background-color:orange;">**Wait for Message**</mark>](#user-content-fn-2)[^2].

![](https://content.gitbook.com/content/83PS3g9zpWmq73xzlwFn/blobs/fBKdyMyUudbCGijyPQxS/image.png)

### 4. Quest Completion

Once the condition for the Quest type is met:

* **Auto Completion -** The Quest instantly completes
* [<mark style="background-color:orange;">**Requires Message**</mark>](#user-content-fn-1)[^1] **-** A specified Message is still required to complete the Quest

{% hint style="warning" %}
The **Wait for Input** option was removed in Game Maker 0.11. This can be replaced with the **Requires Message** quest type.
{% endhint %}

### 5. Action After Completion

Once the Quest is completed:

* **Send Message -** A Message will be sent, which can trigger a new Quest or other logic

{% hint style="warning" %}
The **End Game** option has been removed in 0.11. This should be handled by triggering a [victory](https://docs.sandbox.game/en/creator/game-maker/docs/components/gameplay/victory "mention") or [defeat](https://docs.sandbox.game/en/creator/game-maker/docs/components/gameplay/defeat "mention") component directly.
{% endhint %}

{% hint style="warning" %}
The **Nothing** option was removed in Game Maker 0.11 since it is redundant.
{% endhint %}

***

## Quest Types

The use cases noted for each quest type are only a few ideas to get you started.

{% tabs %}
{% tab title="Counter" %}

### **Counter Quest**

The player must collect or destroy a specified number of objects that have a specified tag.<br>

<div align="left"><figure><img src="https://content.gitbook.com/content/83PS3g9zpWmq73xzlwFn/blobs/1qdAEmxA8OXpLVLZ1lAS/image.png" alt="" width="188"><figcaption></figcaption></figure></div>

#### Collected Objects

<table data-view="cards"><thead><tr><th></th></tr></thead><tbody><tr><td><img src="https://content.gitbook.com/content/83PS3g9zpWmq73xzlwFn/blobs/xSEtQBOzenwDkj2Pvp9e/image.png" alt=""></td></tr><tr><td>Select <strong>CollectedObjects</strong> from the dropdown, set the tag to count, and set the amount required.<br><br>Place at least the specified amount of objects in the game world, each with a <a href="components/actions/collectable"><strong>Collectible Component</strong></a>, and the <a href="using-assets-and-objects/tags"><strong>Tag</strong></a> noted in the Quest applied.</td></tr><tr><td><p><strong>Use Cases:</strong></p><ul><li>Collect the same item as a side Quest, such as voxelite</li><li>Collect different items for a combined purpose, such as recipe ingredients, machine parts, etc.</li></ul></td></tr></tbody></table>

#### Object Deaths

<table data-view="cards"><thead><tr><th></th></tr></thead><tbody><tr><td><img src="https://content.gitbook.com/content/83PS3g9zpWmq73xzlwFn/blobs/ahBPfBphM49NMp4MgqiJ/image.png" alt=""></td></tr><tr><td>Select <strong>Deaths</strong> from dropdown, set the tag to count, and set the amount required. <br><br>Place at least the specified amount of objects in the game world, each with a <a href="components/status/health"><strong>Health Component</strong></a> and the <a href="using-assets-and-objects/tags"><strong>Tag</strong></a> noted in the Quest applied.</td></tr><tr><td><p><strong>Use Cases:</strong></p><ul><li>Destroy the same type of enemies</li><li>Destroy a variety of enemies in a room</li><li>Destroy objects to propel a narrative (e.g., rocks to escape a cave)</li><li>Destroy relay objects to kill a more powerful enemy (boss fight)</li></ul></td></tr></tbody></table>

{% hint style="warning" %}
**NOTE**

The Health Component includes a parameter **Invincible**, which must be set to ***False*** in order for it to be possible to destroy the object and make it count toward the Quest condition.
{% endhint %}
{% endtab %}

{% tab title="Asset Death" %}

### **Asset Death Quest**

The player must destroy a specific object.&#x20;

<table data-view="cards"><thead><tr><th></th></tr></thead><tbody><tr><td><img src="https://content.gitbook.com/content/83PS3g9zpWmq73xzlwFn/blobs/FKDPXlZSs2K4aHNbKQtl/image.png" alt=""></td></tr><tr><td>Click on the <strong>Asset to Watch</strong> field to open a window and select a specific object you have placed in the Experience.</td></tr><tr><td><p><strong>Use Cases:</strong></p><ul><li>Boss fight, single enemy</li><li>Boss fight, multiple "holograms," one target</li><li>Destroy a specific object as part of a narrative</li></ul></td></tr></tbody></table>

{% hint style="success" %}
**NOTE**

If you place an Asset multiple times in Experience, each will be a unique object with the same name. To make it easy to find a specific instance of an asset in the popup window, rename the object in the [**Hierarchy**](https://docs.sandbox.game/en/creator/game-maker/build-menus/side-bar#hierarchy) or the [**Properties Panel**](https://docs.sandbox.game/en/creator/game-maker/docs/build-menus/properties-panel) first.
{% endhint %}
{% endtab %}

{% tab title="Timer" %}

### **Timer Quest**

The player must complete a condition during a specified time limit (seconds) with a goal to survive, defend, or receive a Message.

<div align="left"><figure><img src="https://content.gitbook.com/content/83PS3g9zpWmq73xzlwFn/blobs/7PoNw5gu6oB2mEZnovcb/image.png" alt="" width="188"><figcaption></figcaption></figure></div>

{% hint style="success" %}
The **Game Rules** system can also be used to display timers and text, as well as trigger consequences if the player does not complete a task in time.
{% endhint %}

#### Survive

<table data-view="cards"><thead><tr><th></th></tr></thead><tbody><tr><td><img src="https://content.gitbook.com/content/83PS3g9zpWmq73xzlwFn/blobs/SqpYNsvHzwU4XZULRL3H/image.png" alt=""></td></tr><tr><td><p>Set the <strong>Seconds to wait</strong> as the timer and select <strong>Survive</strong> from the <strong>Goal</strong> dropdown.</p><p></p><p>The player must not die during that time period.</p></td></tr><tr><td><p><strong>Use Cases:</strong></p><ul><li>Boss fight where a door will open if the player can survive, or else they have to take a different route</li><li>Fight an enemy horde</li></ul></td></tr></tbody></table>

#### Defend

<table data-view="cards"><thead><tr><th></th></tr></thead><tbody><tr><td><img src="https://content.gitbook.com/content/83PS3g9zpWmq73xzlwFn/blobs/MMpcj3U2VY7JzaeEHcjH/image.png" alt=""></td></tr><tr><td><p>Set the <strong>Seconds to wait</strong> as the timer and select <strong>Defend</strong> from the Goal dropdown.</p><p></p><p>The player must not allow a target object to be destroyed during that time period.</p></td></tr><tr><td><p><strong>Use Cases:</strong></p><ul><li>Protect an important NPC in the narrative</li><li>Protect an important item in a narrative from enemy attacks during a battle scene (e.g., castle gate)<br></li></ul></td></tr></tbody></table>

{% hint style="success" %}
**CONSEQUENCES**

There is no built in consequence for failing a **Survive** or **Defend** Timer Quest except that the **Action After Completion** will not be executed.

If the Action After Completion is set to **Send Message**, you can create a custom consequence that occurs when the message is NOT received by an object in time.
{% endhint %}

#### Message Needed

<table data-view="cards"><thead><tr><th></th></tr></thead><tbody><tr><td><img src="https://content.gitbook.com/content/83PS3g9zpWmq73xzlwFn/blobs/XXqbkWvsshys7JLqFRao/image.png" alt=""></td></tr><tr><td><p>Set the <strong>Seconds to wait</strong> as the timer and select <strong>Message Needed</strong> from the Goal dropdown.</p><p></p><p>The player's actions must trigger a Message during the specified time period.<br><br><span data-gb-custom-inline data-tag="emoji" data-code="26a0">⚠️</span> (0.11 Multiplayer)<br>The message must be sent through direct player interaction to include <strong>player source</strong> data.</p></td></tr><tr><td><p><strong>Use Cases:</strong></p><ul><li>Timed parkour race</li><li>Timed fetch Quest</li><li>Timed collect Quest</li><li>Timed quiz given by an NPC with a<a href="../creative-guides/experience-design-techniques/game-design/risk-and-reward"> <strong>reward</strong> </a>if completed successfully</li></ul></td></tr></tbody></table>

{% hint style="info" %}
The difference between a **Message Needed** Timer Quest and a [**Wait for Message**](#wait-for-message-quest) Quest is that a timer appears in the UI and the quest will not complete if the message is not recived before it runs out.
{% endhint %}
{% endtab %}

{% tab title="Wait for Message" %}

### **Wait for Message Quest**

The player's actions must trigger a specified Message to be received.

<table data-view="cards"><thead><tr><th></th></tr></thead><tbody><tr><td><img src="https://content.gitbook.com/content/83PS3g9zpWmq73xzlwFn/blobs/0zPEQgfYjTbNI8PajIaB/image.png" alt=""></td></tr><tr><td>Set a Message to receive. Place an object in the game world for players to interact with (pressing E to send the Interact message, detection, collection, etc).<br><br>The player must trigger the message to be sent to Objectives to complete the quest.</td></tr><tr><td><p><strong>Use Cases:</strong></p><ul><li>Detect a pickable item or the player's avatar at a location</li><li>Quest driven by an NPC's Asker Behaviour responses</li><li>Points of interest Quest</li></ul></td></tr></tbody></table>

{% hint style="success" %}
This is the most commonly used Quest type due to its flexibility. There are multiple ways to send a message through the player's actions.&#x20;

The Quest description must clearly describe what the player must do so the message required will be triggered.
{% endhint %}

{% hint style="warning" %}
**GAME MAKER 0.11 UPDATE - PLAYER SOURCE REQUIRED**

For multiplayer games, the new Objectives System requires messages to be sent to **Objectives** from direct player interaction (Asker, Trigger Volume, Button, etc). This ensures player source data is sent to **Objectives** so the correct players will experience changed quest states.
{% endhint %}
{% endtab %}
{% endtabs %}

***

## Migration to 0.11 Objectives

When you open an Experience built before Game Maker 0.11 and open the Objectives window, you will be prompted to migrate to the new Objectives system.

{% hint style="success" %}
**GAME MAKER 0.11 - RETROCOMPATIBILITY**

The legacy Objectives system is still supported in 0.11, so you will not be required to migrate.
{% endhint %}

### Migration Helper

If you choose to migrate to the new Objectives system, a helper will appear after quest data is migrated. It will highlight any quests that require manual adjustments to meet requirements of the new multiplayer compatible Objectives system.

{% hint style="warning" %}
Some quest functions could not be adapted to the multiplayer structure and have been modified or removed, but changes are minimal.
{% endhint %}

Info boxes added to this page provide more detailed explanations of what has changed in the update.

The most important change when migrating is to ensure that for multiplayer games, messages sent to Objectives have a **player source** for *every player who should experience a change in quest status* (unlock, launch, completion, post-completion), and players who should not have no way to trigger the message. Player source data is automatically sent with a message upon player interaction (detection, object interaction, etc).

{% hint style="success" %}
See [**0.11 version notes**](https://docs.sandbox.game/en/creator/version-notes-and-changelogs/game-maker-0.11#objectives-system-port) for multiplayer quest use cases and tips.
{% endhint %}

<figure><img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FMXuID0b68e3tCUIh90nw%2Fquests%20migrated.gif?alt=media&#x26;token=86558028-8bec-4895-ab8d-e63882466f00" alt=""><figcaption></figcaption></figure>

[^1]: Player source data required in multiplayer mode

[^2]: Player source data required in multiplayer mode for this quest type


---

# 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/objectives.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.
