# Components

## What is a **Component?** <a href="#getting-acquainted-with-components" id="getting-acquainted-with-components"></a>

<figure><img src="https://4251931498-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MO_j99BJEXK4zHqxgqS%2F-MgcmwPFPQHMO32UkIOJ%2F-Mgcv5Uv8RXzh8u25fzx%2FGMA_GitBook_How%20to%20Set%20Components_Headings_01.png?alt=media&#x26;token=b11caa29-c62e-4b52-b48a-1c171bb40464" alt=""><figcaption><p>Each object may have many components</p></figcaption></figure>

A component is a bundle of logic that applies additional interactive characteristics to an object. This allows for player actions to influence objects directly and indirectly through their actions.

{% hint style="info" %}
**OBJECT LOGIC**

[Behaviours](/en/creator/game-maker/docs/behaviours.md) relate to object or Experience actions. An object may have only ONE.

[Components](/en/creator/game-maker/docs/components.md) relate to player actions. An object may have one of each type.
{% endhint %}

Components allow you to quickly build precise interactions between players and objects, with many parameters that can be modified for custom mechanics. No coding experience is needed!

**Example:**

[Climbable](/en/creator/game-maker/docs/components/actions/climbable.md) can be applied to an object so players can reach an isolated area.

An enemy with a [Health](/en/creator/game-maker/docs/components/status/health.md) component can be defeated. If a [Drop](/en/creator/game-maker/docs/components/actions/drop.md) component is added to it, upon death it can spawn [Collectable](/en/creator/game-maker/docs/components/actions/collectable.md) loot items.

A [Collectable](/en/creator/game-maker/docs/components/actions/collectable.md) object can play a sound and send a message. If a logic actor placed at the same location has [Visual FX](/en/creator/game-maker/docs/components/display/visual-fx.md) activated by the collect message, visual feedback will also appear.

## General Uses and Component Types

The component groupings below are how they're often used. However, a [Health](/en/creator/game-maker/docs/components/status/health.md) component simply allows an object to be destroyed and isn't limited to living things. Think outside the box based on what components can do, and you'll be designing cool custom mechanics in no time!

{% hint style="success" %}
**Tip:** You can select multiple objects and change the same parameters simultaneously.
{% endhint %}

{% hint style="success" %}
**Tips:** Press CTRL+D to duplicate custom objects or groups of objects. Create [Side Bar](/en/creator/game-maker/docs/build-menus/side-bar.md#presets) if you must build with them repeatedly or want to spawn them during live gameplay.
{% endhint %}

**No components applied:** The object can be a prop or be interactive if one of the available [Behaviours](/en/creator/game-maker/docs/behaviours.md)are applied.

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

### Experience Management

[Indicator](/en/creator/game-maker/docs/components/display/indicator.md): Quest icons, distance, or small text labels above an object to guide players.

[Speaker](/en/creator/game-maker/docs/components/actions/speaker.md): Detects tags to send messages, or creates a floating text box above an object.

[Toggle](/en/creator/game-maker/docs/components/status/toggle.md): Controls when the object's behaviour is on or off.

[Defeat](/en/creator/game-maker/docs/components/gameplay/defeat.md): Ends an Experience immediately if triggered.

[Victory](/en/creator/game-maker/docs/components/gameplay/victory.md): Ends an Experience immediately if triggered.

[Plant](/en/creator/game-maker/docs/components/triggers/plant.md): Identify an object as a plant for [Prey](/en/creator/game-maker/docs/behaviours/npc-ai-pawns/prey.md) to eat, or destroy object without animation.
{% endtab %}

{% tab title="Engagement" %}

### Player Engagement

[Button](/en/creator/game-maker/docs/components/triggers/button.md): Pressing sends a message to a target for an outcome.

[Collectable](/en/creator/game-maker/docs/components/actions/collectable.md): Adds an asset to the player's inventory, sends a message, plays a sound.

[Drop](/en/creator/game-maker/docs/components/actions/drop.md): Interacting or destroying the object spawns a specified item (loot, etc).

[Health](/en/creator/game-maker/docs/components/status/health.md): Apply to make an object destructible. Can send a delayed message after "death."
{% endtab %}

{% tab title="Physics" %}

### Physics-Based

[Climbable](/en/creator/game-maker/docs/components/actions/climbable.md): Allows players to climb up and down an object.

[Pickable](/en/creator/game-maker/docs/components/actions/pickable.md): Allows players to pick up, move, and place an object. Can't be taken while held.

[Slide](/en/creator/game-maker/docs/components/actions/slide.md): Forces players to slide on the surface of an object instead of walking.
{% endtab %}

{% tab title="Ambience/Media" %}

### Experience Ambience/Media

[Image Display](/en/creator/game-maker/docs/components/nft/image-display.md): Display pre-made images on frame assets. (See [Create Frame Assets](/en/creator/voxedit/docs/modeler/create-frame-assets.md))

[NFT Image Display](/en/creator/game-maker/docs/components/nft/nft-image-display.md): Display 2D Ethereum NFT images in your wallet on frame assets. (See [Create Frame Assets](/en/creator/voxedit/docs/modeler/create-frame-assets.md))

[NFT Details Display](/en/creator/game-maker/docs/components/nft/nft-details-display.md): Opens a popup window with NFT info and marketplace link.

[Play Sound](/en/creator/game-maker/docs/components/audio/play-sound.md): Play pre-made sound effects in a range or globally.

[Rarity VFX](/en/creator/game-maker/docs/components/display/rarity-vfx.md): A column of light and sparkles coloured by object rarity.

[Visual FX](/en/creator/game-maker/docs/components/display/visual-fx.md): Play a customizable visual effect from hundreds of options.

[Light](/en/creator/game-maker/docs/components/display/light.md): Point or spot light emitting from the object, with custom colours and transitions.
{% endtab %}
{% endtabs %}

## Adding Components to Objects <a href="#adding-components-to-objects" id="adding-components-to-objects"></a>

With [Behaviours](/en/creator/game-maker/docs/behaviours.md), only one can be applied to control an object's actions. Many components can be applied to an object to make it more interactive.

<figure><img src="https://4251931498-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MO_j99BJEXK4zHqxgqS%2F-MgcmwPFPQHMO32UkIOJ%2F-MgdfI1iwtM1wk6v3xX_%2FMultiple_Components_03.png?alt=media&#x26;token=4dd8cad0-4f18-4a1e-8dde-bae7a99c7c48" alt="" width="563"><figcaption></figcaption></figure>

{% tabs %}
{% tab title="1. Select" %}

1. Left click to select an object. This will open the **Properties Panel** on the right side of the screen.

<figure><img src="https://4251931498-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MO_j99BJEXK4zHqxgqS%2F-MghmZ1IXv8Cdqn0OxcG%2F-MgiAl9n-oTYgK1IV3MK%2FBehaviour_Properties_Panel_02.png?alt=media&#x26;token=e6fa4780-cb41-4a41-814b-9b8040cd9e2e" alt=""><figcaption><p>Click any object to open the Properties Panel.</p></figcaption></figure>
{% endtab %}

{% tab title="2. Open Components Window" %}
2\. Beneath **Behaviour**, click on the **Components** field where it says **Add Component**. If components are already applied, they will show beneath this field.

<figure><img src="https://4251931498-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MO_j99BJEXK4zHqxgqS%2F-MgcmwPFPQHMO32UkIOJ%2F-MgdKIv94ZsaReA8uhgg%2FProperties_Panel_01.png?alt=media&#x26;token=4faaf7bc-102c-4d35-9ad9-f3e3d6faac7d" alt=""><figcaption><p>Component details are located in the Properties Panel under Behaviour.</p></figcaption></figure>
{% endtab %}

{% tab title="3. Select" %}
3\. A window named **Select Component** will pop up with available options. In this example, we’ll choose the **Indicator** component.\
\
The **Select Component** window will close, and the chosen component will now appear in the **Properties Panel** along with its default settings.

<figure><img src="https://4251931498-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MO_j99BJEXK4zHqxgqS%2F-MgcmwPFPQHMO32UkIOJ%2F-MgdMLZN8zYobOFH-KhI%2FSelect_Components_01.png?alt=media&#x26;token=6b5ff908-4ce0-46cf-8c26-8449e13c9362" alt=""><figcaption><p>The component you select is added to the object in the Properties Panel</p></figcaption></figure>

In our **Indicator** component example, default logic is automatically added. In play mode you can see the object's name as a label above it and the visibility distance displayed in metres if you are far away. This particular component can be linked to quests and used to label objects in the game with icons or text to help guide players.
{% endtab %}

{% tab title="4. Customise" %}
4\. Click the **Edit Logic** button to see the full [Behaviour & Component Parameters](/en/creator/game-maker/docs/using-assets-and-objects/behaviour-and-component-parameters.md) for any behaviour and components applied to the object.\
\
Here you can see how the object will work in your Experience and customise parameters such as **Quest cursors**, **Interactive VFX**, etc.\
\
You can also scroll to the bottom of the object's properties and change its identity tags so it will be detected specific to your game's mechanics.\
\
Test your logic frequently by presssing the **TAB** key to toggle on and off Play mode.

<figure><img src="https://4251931498-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MO_j99BJEXK4zHqxgqS%2F-MgcmwPFPQHMO32UkIOJ%2F-MgdTx6J2ubdA_d378z6%2FComponents_Edit_Logic_01.png?alt=media&#x26;token=f7611bd3-dd74-48b6-bebe-ef85a03169a5" alt=""><figcaption><p>Click <strong>Edit Logic</strong> to inspect and customise the object's behaviour and components</p></figcaption></figure>

If you need to go back to the default view of the Properties Panel, click the **X** next to Logic at the top. None of your settings will be lost.

<figure><img src="https://4251931498-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MO_j99BJEXK4zHqxgqS%2F-MgcmwPFPQHMO32UkIOJ%2F-MgdVmxBA_7-4jzcCjkr%2FExit_Edit_Logic_01.png?alt=media&#x26;token=7a99343a-bff0-48e2-b5bf-fdc2b9c3bd1a" alt=""><figcaption><p>Click the <strong>X</strong> at the top left to go back to the default Properties Panel view</p></figcaption></figure>
{% 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/components.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.
