# Collectable

<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>プレイヤーがインベントリのアイテムを消費するタイミングを決めることができます。（C キー）</td><td><a href="https://1963719226-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FV8pr5EgDZn2rnTUJE8XB%2Fuploads%2FQJWuGDD3qqkdkK02aJZs%2Fconsumables.webp?alt=media&#x26;token=4f677d3f-8b42-4a7c-82f2-b3d96f2612d0">consumables.webp</a></td></tr><tr><td><strong>Message on Equip（0.9）</strong></td><td>収集した装備品をプレイヤーが装備する度にメッセージを送信します。</td><td><a href="https://1963719226-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FV8pr5EgDZn2rnTUJE8XB%2Fuploads%2Ff9gx8p7vRzlLzY0Ikceg%2Fmessage%20on%20equip.webp?alt=media&#x26;token=f52d7dd9-a714-4759-9886-ba99e50926e0">message on equip.webp</a></td></tr><tr><td><strong>マルチプレイヤーでの変更点（0.10）</strong></td><td><strong>Curio</strong> のトグルと統合されました：<br><strong>True</strong> の場合 - 一人のプレイヤーだけが収集できます。<br><strong>False</strong> の場合 - すべてのプレイヤーが収集できます。</td><td><a href="https://1963719226-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FV8pr5EgDZn2rnTUJE8XB%2Fuploads%2FsuNS7PQoJqx1hfJzQQ9U%2Fmultiplayer%20rework.gif?alt=media&#x26;token=9a5098a9-bbfd-4ea6-92f6-e355f9a470a8">multiplayer rework.gif</a></td></tr></tbody></table>

{% hint style="info" %}
[**シングルプレイヤーとマルチプレイヤーのロジックを制作**](https://docs.sandbox.game/jp/creators/game-maker/creative-guide/game-rule-guide/build-singleplayer-and-multiplayer-logic)のページでも<mark style="color:green;">**\[SP]**</mark> や <mark style="color:orange;">**\[MP]**</mark> のビヘイビアやコンポーネントの使い方をご紹介しています。
{% endhint %}

## ![](https://docs.sandbox.game/~gitbook/image?url=https%3A%2F%2F331512196-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F83PS3g9zpWmq73xzlwFn%252Fuploads%252FeCD4SFNnAcAy85tdx0ai%252Fimage.png%3Falt%3Dmedia%26token%3Dc58f5cd8-3eb0-4289-bf49-20a07a78f2b5\&width=300\&dpr=4\&quality=100\&sign=1f862ef5\&sv=2) **Collectable のコンポーネント&#x20;**<mark style="color:green;">**\[SP]**</mark> <mark style="color:orange;">**\[MP]**</mark>

* E キーでインタラクションを取るか、コリジョン（プレイヤーのインベントリに移動）を起こしてオブジェクトを拾う

## コミュニケーション

<table data-header-hidden><thead><tr><th width="278"></th><th></th></tr></thead><tbody><tr><td><p><strong>インプット</strong>：</p><p>オブジェクトを拾う方法：</p><ul><li>E キーでインタラクション</li><li>コリジョン</li></ul><p>オブジェクトはインベントリに保管されます。</p><p></p></td><td><p><strong>アウトプット</strong>：</p><p>オブジェクトに以下の事象が起こるとメッセージが送信されます。</p><ul><li>オブジェクトが拾われる</li><li>C キーでインベントリから消費される</li><li>装備される（装備品アセット）</li></ul><p></p></td></tr></tbody></table>

## おすすめの使い方

* 収集したオブジェクトが以下の状態の場合にゲームプレイやアバターのバフ / デバフをプレイヤーの選択肢に応じてトリガーできます。
  * 装備されている（装備品の場合）
  * 🆕 消費される（トグルを使って消耗品として設定されている）
* ストーリーやクエストの一部としてオブジェクトを収集することができます。（材料やスペシャルアイテムなど）
* 特別な装備品などへのアクセスを可能にするために、リスクを取って段階的にプレイヤーに報酬を与えることができます。
* 隠れアイテムを探したり、すべてのアイテムを集めるなどしてプレイヤーのモチベーションを高めることができます。
* プレイヤーのインベントリに消費できるようなアイテムがなかったとしても、アイテム購入などのエコノミックな面を作り出すことができます。
* コリジョンの際にオブジェクトを消すようなメカニクスを持ったゲームを制作できます。（消えたアイテムはプレイヤーのインベントリに追加されます。）

## パラメーター

| オプション                                                                                                                                                                                                                                                                  | 詳細                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <img src="https://1963719226-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FV8pr5EgDZn2rnTUJE8XB%2Fuploads%2FW03ayUQ4ZFot97kkLNlD%2Fimage.png?alt=media&#x26;token=89b161e5-067d-45a2-8d0f-42f7751a378f" alt="" data-size="original">             | <p><em><mark style="color:green;"><strong>Global</strong></mark></em>（MP ではトグルで表示）</p><p><strong>True</strong> - 体験1 つにつき1 つのインスタンスを収集可能<br><strong>False</strong> - プレイヤー1 人につき1 つのインスタンスを収集可能</p>                                                                                                                                                                                                                                                                         |
| ![](https://1963719226-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FV8pr5EgDZn2rnTUJE8XB%2Fuploads%2FrBEx27nymW6Q0z59wx4g%2Fcollect%20action.avif?alt=media\&token=1cd099c4-a97f-440a-b931-80ee63e39f84)                                        | **Collect Action** - アイテム収集のために起こすアクションを設定できます。（アバターのコリジョンやインタラクション）                                                                                                                                                                                                                                                                                                                                                                                                        |
| ![](https://content.gitbook.com/content/V8pr5EgDZn2rnTUJE8XB/blobs/lMLAagrgkjtEb1lW1kiJ/2.png)                                                                                                                                                                         | **Display Name** - アイテムが収集された時に右下に表示されるオブジェクトの名前を設定できます。（アセット名はインベントリに表示されます。）                                                                                                                                                                                                                                                                                                                                                                                              |
| <img src="https://1963719226-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FV8pr5EgDZn2rnTUJE8XB%2Fuploads%2FzjwKSl7gdMJebO52x9Ju%2Fcollect%20amount.avif?alt=media&#x26;token=3492f45d-94e4-41b9-896d-c1fe32aee0ce" alt="" data-size="original"> | **Collect Amount** - アイテムが収集された時にインベントリに追加できるオブジェクトの数を設定できます。                                                                                                                                                                                                                                                                                                                                                                                                               |
| ![](https://content.gitbook.com/content/V8pr5EgDZn2rnTUJE8XB/blobs/JIZS2ZR94NuUX5DtZi9z/3.png)                                                                                                                                                                         | **Collect Sound** - アイテムが収集された時に再生される音楽を設定できます。                                                                                                                                                                                                                                                                                                                                                                                                                             |
| ![](https://1963719226-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FV8pr5EgDZn2rnTUJE8XB%2Fuploads%2FYJlNA9W7eg2UjGSlqmaK%2Fmessage%20on%20collect.avif?alt=media\&token=76a66b35-ba76-4515-97f7-d6ca18bb4cfc)                                  | **Message on Collect** - アイテムが収集された時に送信スルメッセージを設定できます。                                                                                                                                                                                                                                                                                                                                                                                                                      |
| <img src="https://1963719226-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FV8pr5EgDZn2rnTUJE8XB%2Fuploads%2FGEA39An4MbkKwEq5E4rU%2Fimage.png?alt=media&#x26;token=45e6efdb-7f6e-417a-8ad3-6166eda2a6ba" alt="" data-size="original">             | <p><strong>Broadcast Type -</strong> メッセージの送信方法を設定できます。<br><br>オプションでは追加のパラメーターを設定することができます。</p>                                                                                                                                                                                                                                                                                                                                                                            |
| <img src="https://1963719226-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FV8pr5EgDZn2rnTUJE8XB%2Fuploads%2FCxKmpJPmHudYXHj0WF9v%2Fimage.png?alt=media&#x26;token=3558b35a-9d92-4872-9dbb-336cf4b58b1a" alt="" data-size="original">             | **Is Droppable** - インベントリを通じてドロップできるかどうかをトグルを使って設定できます。                                                                                                                                                                                                                                                                                                                                                                                                                     |
| <img src="https://1963719226-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FV8pr5EgDZn2rnTUJE8XB%2Fuploads%2FJUO6K3KiONmwfWfpbyLc%2Fimage.png?alt=media&#x26;token=a1ac993a-2cac-45d1-aed4-1d3076b11970" alt="" data-size="original">             | **Is Consumable -** ロジックをトリガーするためにプレイヤーがアイテムを消費してメッセージを送ることができるかどうかをトグルを使って設定できます。（All、Self/Player、Rules などを選択できます）                                                                                                                                                                                                                                                                                                                                                         |
| <img src="https://1963719226-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FV8pr5EgDZn2rnTUJE8XB%2Fuploads%2FSjl0U8s1kJkN28HUwtmN%2Fimage.png?alt=media&#x26;token=bcdfde6b-acc3-429d-b61b-75b8f878c26a" alt="" data-size="original">             | <p><strong>On Equip Broadcast</strong>（装備品アセット） <strong>Message on Equip</strong> - 収集された装備品がプレイヤーのアバターに装備されると送信するメッセージを設定できます。</p><p><strong>Equip Broadcast Type</strong> - メッセージの送信方法を設定できます。</p><p></p><ul><li><strong>All</strong> - すべてのシステムに送信します。</li><li><strong>Self</strong> - アイテムを装着しているプレイヤーに送信します。（バフ / デバフ用にHealth、Speed、Oxygen などの<a href="power-up"><strong>Power Up</strong></a> メッセージを使用します。）</li><li><strong>Rules</strong> - ルールシステムに送信します。</li></ul> |


---

# 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/jp/creators/game-maker/document/components/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.
