# Collectable

{% hint style="success" %}
**COPY/PASTE PARAMETERS**

New in GM 0.11! Right click on a behaviour or component to copy. Then open an object, add the same behaviour or component, and right click it to paste identical parameter settings.
{% endhint %}

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-cover data-type="files"></th></tr></thead><tbody><tr><td><strong>Consumables (0.10)</strong></td><td>Let players decide when to consume Inventory items for an effect (press <strong><code>C</code></strong>)</td><td><a href="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FXtc8iFn2xCzY55V6zfXL%2FGM%20Consumables%20collectable%20component%20sm%20opt.gif?alt=media&#x26;token=68021fb5-8b5a-4259-81e6-e03f15a54f8a">GM Consumables collectable component sm opt.gif</a></td></tr><tr><td><a href="../../../creative-guides/logic-guide/equipment-based-logic-on-equip-nft-sensor"><strong>Message on Equip (0.9)</strong></a></td><td>Send a message each time a player equips collected equipment</td><td><a href="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FsHlMHIPvpiqSu3R67MLE%2FGM%200.9%20Collectable%20message%20on%20equip.gif?alt=media&#x26;token=9160e5b6-f2fe-477f-b14f-4bd4d8fa5092">GM 0.9 Collectable message on equip.gif</a></td></tr><tr><td><strong>Multiplayer Rework (0.10)</strong></td><td><p><strong>Global</strong> toggle merges Curio:<br><strong>True</strong> - One player collects</p><p><strong>False</strong> - Every player collects</p></td><td><a href="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FcBDKwOr39qwkTCZb0PJ6%2Fcomponent_CurioMerge_collectable-resize.gif?alt=media&#x26;token=ae29bd23-b514-47fd-bb4d-245ad46e005b">component_CurioMerge_collectable-resize.gif</a></td></tr></tbody></table>

{% hint style="info" %}
[build-singleplayer-and-multiplayer-logic](https://docs.sandbox.game/en/creator/game-maker/docs/build-singleplayer-and-multiplayer-logic "mention") - about <mark style="color:green;">**\[SP]**</mark> or <mark style="color:yellow;">**\[MP]**</mark> behaviours or components
{% endhint %}

## ![](https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FeCD4SFNnAcAy85tdx0ai%2Fimage.png?alt=media\&token=c58f5cd8-3eb0-4289-bf49-20a07a78f2b5) Collectable <mark style="color:green;">\[SP]</mark> <mark style="color:yellow;">\[MP]</mark>

* Collect an object by interaction (press **`E`**) or collision (enters the player Inventory)

## Communications

<table data-header-hidden><thead><tr><th width="351"></th><th></th></tr></thead><tbody><tr><td><p><strong>Inputs:</strong><br>Collect an object by:</p><ul><li>Interacting (press <code>E</code>)</li><li>Collision</li></ul><p>The object enters the player Inventory </p></td><td><p><strong>Outputs:</strong></p><p>One message may be sent when the object is:</p><ul><li>collected</li><li>consumed from Inventory (press <strong><code>C</code></strong>)</li><li>equipped (equipment assets)</li><li>unequipped (equipment assets)</li></ul></td></tr></tbody></table>

## Common Uses

* Trigger gameplay, Avatar buffs/debuffs, etc. based on player choice when collected objects are:
  * Equipped (if equipment)
  * :new: Consumed (if set as consumable with toggle)
  * Unequipped (if equipment)
* Collecting objects as part of a story or quest (materials, special items, etc)
* Rewarding players gradually for risk-taking by allowing them to access increasingly beneficial Equipment to use
* Motivating players to explore by finding hidden items and/or collecting all items
* Creating what feels like an economy to purchase items, though the player Inventory currently does not track items being consumed
* Any game with a mechanic to make Objects disappear upon collision (which will add up in the player Inventory)
* Combine Equip and Unequip messages to sense if a player is wearing the correct items for a certain location like a disguise.
* Use Auto Equip to immediately award abilities when players are in a race so they don't waste time in the inventory menu. Or use it to switch players to non-ability equipment to knock them out of the sky mid-flight.

## Parameters

| Options                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | Details                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2F58Z00YyyFnUrScYSCV3K%2Fimage.png?alt=media&#x26;token=9d37c7c2-1740-4217-a1ff-5310c80ae308" alt="" data-size="original">                                                                                                                                                                                                                                                    | <p><strong>Global</strong> (toggle in MP Collectable)</p><p><strong>True</strong> - One instance per Experience to collect<br><strong>False</strong> - One instance per player to collect</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| ![](https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FwW5LdAPMOKWz0FZ6eAvi%2Fimage.png?alt=media\&token=8df49c16-415c-479e-9e40-90f20ca43c55)                                                                                                                                                                                                                                                                                           | **Collect Action** - Defines how the collection occurs (Avatar collision or interaction)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| ![](https://content.gitbook.com/content/83PS3g9zpWmq73xzlwFn/blobs/jj34h1XNntjJNyEnll80/2.png)                                                                                                                                                                                                                                                                                                                                                                                                               | <p><strong>Display Name</strong> - Name of the object displayed in the bottom right when collected <br>(Note: asset name appears in Inventory)</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| <img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FkSnFKWFMqUoCE93wCqYH%2Fimage.png?alt=media&#x26;token=a938577f-7a40-4376-a374-6e083bc05179" alt="" data-size="original">                                                                                                                                                                                                                                                    | **Collect Amount** - How many objects are added to the Inventory when collected                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| ![](https://content.gitbook.com/content/83PS3g9zpWmq73xzlwFn/blobs/rEwQQN8Do4WPuzblo8Db/3.png)                                                                                                                                                                                                                                                                                                                                                                                                               | **Collect Sound** - Sound played when collected                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| <img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FAhYlmCsPa0jm1rxcab7D%2Fimage.png?alt=media&#x26;token=c4799a0b-f795-4a70-8060-d4d81901ecd7" alt="" data-size="original">                                                                                                                                                                                                                                                    | **Message on Collect** - Message sent when collected                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| <img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2F9s4yDhFWlPnWzJCI2kiH%2Fimage.png?alt=media&#x26;token=dd4d9a86-403c-49c8-befa-c304f29a1b2f" alt="" data-size="original">                                                                                                                                                                                                                                                    | <p><a href="../../../using-assets-and-objects/behaviour-and-component-parameters#creating-custom-messages"><strong>Broadcast Type</strong></a> (dropdown) -</p><p>How the message will be sent</p><p></p><p>Options may include additional parameters</p><p></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| ![](https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2F7HL7lktRRuOneL7iVNOi%2Fimage.png?alt=media\&token=cc293941-11d1-486c-9763-d16c96453100)                                                                                                                                                                                                                                                                                           | **Shows in Inventory** (toggle) - default is on. Toggle to false to hide items from inventory view - good for items designed for rules or other interactions where the player doesn't need to see them. It will also disable Droppable, Consumable, and Equip options.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| <img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2Fs5VF5IchUEXWqr7wfCkt%2Fimage.png?alt=media&#x26;token=3909278c-27eb-4600-913f-0dd780fb4f73" alt="" data-size="original">                                                                                                                                                                                                                                                    | **Is Droppable** (toggle) - can drop via Inventory                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| <img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FRW7rXC4OOBaeqPv0h104%2Fimage.png?alt=media&#x26;token=038c7492-ec5d-48ac-bb90-902e827a52d6" alt="" data-size="original">                                                                                                                                                                                                                                                    | **Is Consumable** (toggle) - players can consume and send a message to trigger logic (broadcast to all, self/player, or rules)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| <p><img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FHp5gqylpJvXyXA9OCroS%2Fimage.png?alt=media&#x26;token=2151c89f-5951-40d6-835b-889525c4c78a" alt="" data-size="original"><br><br><img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FQBnlJYyxbRpkxKz1loE8%2Fimage.png?alt=media&#x26;token=b730db31-95d2-4a65-a0c2-173364bc8ec9" alt=""></p> | <p><strong>On Equip Broadcast</strong> (for equipment assets)<br><strong>Message on Equip</strong> - message sent when the collected equipment is applied to the player's avatar (sent every time it is equipped)<br><strong>Equip Broadcast Type</strong> - How the message is sent</p><ul><li><strong>All</strong> - send to all systems</li><li><strong>Self</strong> - send to the player wearing the item (use for <a data-mention href="../status/power-up">power-up</a> messages such as Health, Speed, and Oxygen for buffs/debuffs)</li><li><strong>Rules</strong> - send to Rules System</li></ul><p><strong>Message on Unequip</strong> - message sent when items are removed by the player.<br><strong>Auto Equip</strong> (toggle) - item is immediately put on by the player when they collect it.</p> |

## On Equip - Effects & Enhancement


---

# 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/actions/collectable.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.
