# Equipment Based Logic - On Equip / NFT Sensor

{% hint style="info" %}
**EQUIPMENT: ASSETS vs NFTs**

* Equipment provided in game must be collected and worn to send an **On Equip** message.
* To trigger logic in this guide with NFTs a player owns (which offers exclusive gameplay):
  * Trigger with [nft-sensor](https://docs.sandbox.game/en/creator/game-maker/docs/components/nft/nft-sensor "mention") component's **Success** message instead of **On Equip**
  * Modify the narrative to be about owning rather than equipping items found in game
    {% endhint %}

## ABOUT MESSAGE ON EQUIP

<table data-card-size="large" data-view="cards"><thead><tr><th></th><th></th><th></th><th data-hidden data-card-cover data-type="files"></th></tr></thead><tbody><tr><td><strong>Message on Equip (GM 0.9)</strong></td><td>A message can be sent to <strong>All</strong> logic, the player (<strong>Self</strong>), or the <strong>Rules</strong> system when the player equips a collectable equipment asset.</td><td><span data-gb-custom-inline data-tag="emoji" data-code="2705">✅</span> Choose <strong>Self</strong> to send the message to the player who collected and equipped the item.</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>HOW IT WORKS</strong></td><td><strong>Creators:</strong><br>1. Apply a <a data-mention href="../../docs/components/actions/collectable">collectable</a> component to equipment to see <strong>On Equip</strong> options.<br>2. Set a <strong>Message On Equip</strong> (what to send).<br>3. Set <strong>Equipment Broadcast Type</strong> <br>(where to send it).<br>4. Set the <strong>On Equip</strong> message as the <strong>Message Required</strong> in logic you want to trigger.<br></td><td><strong>Players:</strong><br>1. Collect the equipment item.<br>2. Press <strong><code>I</code></strong> to open your Inventory.<br>3. Select the equipment and press <strong><code>E</code></strong> to equip, or simply double click it.<br>4. Enjoy triggered outcomes!</td><td></td></tr></tbody></table>

{% hint style="warning" %}
**NO UNEQUIP MESSAGE**\
Currently there is no "**On&#x20;**<mark style="background-color:orange;">**Un**</mark>**equip**" message option. Design your Experience logic to avoid broken immersion if the player removes equipment, which **WILL NOT** send a message.
{% endhint %}

***

## GAMEPLAY FLOW

## 1. Get Equipment Item(s)

* Beginning equipment (must be collected, not applied to avatars at start via [Spawn Point](https://docs.sandbox.game/en/creator/game-maker/docs/behaviours/basic-logic/spawn-point-and-avatars-feature))
* Receive from an NPC (e.g., for a quest)
* Discover via hints and exploration
* Buy/trade/craft with resources
* Item [drop](https://docs.sandbox.game/en/creator/game-maker/docs/components/actions/drop "mention") when an enemy dies

## 2. Equip to Trigger Logic

### **Use On Equip Message**

{% tabs %}
{% tab title="First Tab" %}

* **One equipment item required**
* **Communicates one time** with other logic (e.g., launch a quest)
  {% endtab %}
  {% endtabs %}

### Use On Equip Message(s) + Event Count & Check Setup

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

* **One or multiple equipment**
* **Communicates many times** check if item(s) were ever equipped (e.g., new skill unlocked)
  {% endtab %}

{% tab title="Variations" %}

### **Variations**

{% hint style="success" %}
**Equipment Used Together (e.g., for a quest)**\
This Event Count & Check setup includes a ruleset that requires 1 item using the **Compare Number** rule's **Fixed Value**. Set to any number (6 is a full equipment set).
{% endhint %}

{% hint style="success" %}
**Equipment Use Over Time (e.g., for player leveling/growth)**\
Set the **Fixed Value** to any number of equipment you require to unlock gameplay.\
\
**Example (Power/Defense):** Using more powerful equipment unlocks a boss fight.\
**Example (Knowledge/Observation):** Exploration/item use unlocks new areas.
{% endhint %}

{% hint style="success" %}
**Combination of Different Events**

Count a combination of event types, not just equipping a certain number of items.\
**Example:**\
Event: Place pickable equipment on a charge base to fill the battery\
Event: Equip item to use it (which can trigger many potential use cases)
{% endhint %}
{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="How it Works" %}

### Event Count & Check

* Count any number of events (e.g., equipment worn, player deaths, etc.) one time each
* Compare this count to a goal amount
* Optional: Check the state of the goal (met or not) for continuous use (e.g., unlocked skill)

{% hint style="warning" %}
Currently this method will not count Quests.
{% endhint %}
{% endtab %}

{% tab title="Ruleset: Quick Setup" %}

### **Event Count & Check Ruleset**

1. Copy the JSON text in the box below and paste into your Rules grid board. Messages and variables included are automatically created.
2. Follow the **Integration Notes**.

```json
{
  "GameplayData": {
    "Version": 20,
    "SaveData": "{\"RulesetDatas\":[{\"TreeDatas\":[{\"DisplayName\":\"Math - Add Event to EVENT COUNTER\",\"PresetId\":\"MathTree\",\"Id\":\"bd52c5b8-0d19-474d-9a99-3bd5b6a7c8d0\",\"EnableDebugging\":false,\"TreeFieldData\":{\"TriggerMessage\":\"Event.Triggered\",\"MathOperand1\":\"{\\\"ValueSource\\\":0,\\\"SubSaveData\\\":{\\\"Constant\\\":\\\"0.0\\\",\\\"BlackboardValue\\\":\\\"{\\\\\\\"BlackboardType\\\\\\\":1,\\\\\\\"Id\\\\\\\":\\\\\\\"3933e860-af41-4e34-91fc-cc4e6f7adcce\\\\\\\"}\\\",\\\"MessageArgument\\\":\\\"{\\\\\\\"MessageId\\\\\\\":\\\\\\\"Event.Triggered\\\\\\\",\\\\\\\"Field\\\\\\\":null}\\\"}}\",\"MathOperator\":\"0\",\"MathOperand2\":\"{\\\"ValueSource\\\":2,\\\"SubSaveData\\\":{\\\"Constant\\\":\\\"1.0\\\",\\\"BlackboardValue\\\":\\\"{\\\\\\\"BlackboardType\\\\\\\":0,\\\\\\\"Id\\\\\\\":\\\\\\\"\\\\\\\"}\\\",\\\"MessageArgument\\\":\\\"{\\\\\\\"MessageId\\\\\\\":\\\\\\\"Event.Triggered\\\\\\\",\\\\\\\"Field\\\\\\\":null}\\\"}}\",\"Score\":\"{\\\"BlackboardType\\\":1,\\\"Id\\\":\\\"3933e860-af41-4e34-91fc-cc4e6f7adcce\\\"}\",\"OutgoingMessage\":\"{\\\"MessageId\\\":\\\"Events.Check\\\",\\\"ArgumentsData\\\":[]}\"}},{\"DisplayName\":\"Compare Numbers - EVENT COUNTER vs GOAL\",\"PresetId\":\"MessageOnAmountTree\",\"Id\":\"b7dbf75a-7881-4a66-a3e9-a2349c476dab\",\"EnableDebugging\":false,\"TreeFieldData\":{\"TriggerMessage\":\"Events.Check\",\"Score\":\"{\\\"BlackboardType\\\":1,\\\"Id\\\":\\\"3933e860-af41-4e34-91fc-cc4e6f7adcce\\\"}\",\"Equation\":\"0\",\"ValueSource\":\"{\\\"ValueSource\\\":0,\\\"SubSaveData\\\":{\\\"Constant\\\":\\\"1.0\\\",\\\"BlackboardValue\\\":\\\"{\\\\\\\"BlackboardType\\\\\\\":1,\\\\\\\"Id\\\\\\\":\\\\\\\"78b4080a-3228-4a51-83b0-4cb60db9f008\\\\\\\"}\\\",\\\"MessageArgument\\\":\\\"{\\\\\\\"MessageId\\\\\\\":\\\\\\\"Events.Check\\\\\\\",\\\\\\\"Field\\\\\\\":null}\\\"}}\",\"CreateConditionalEvent\":\"False\",\"OutgoingMessage\":\"{\\\"MessageId\\\":\\\"Events.Done\\\",\\\"ArgumentsData\\\":[]}\"}},{\"DisplayName\":\"Set number value - Reset EVENT COUNTER (reuse)\",\"PresetId\":\"SetValueTree\",\"Id\":\"9d7d057d-65d4-4019-aa40-b433858e11ff\",\"EnableDebugging\":false,\"TreeFieldData\":{\"TriggerMessage\":\"Events.CounterReset\",\"Score\":\"{\\\"BlackboardType\\\":1,\\\"Id\\\":\\\"3933e860-af41-4e34-91fc-cc4e6f7adcce\\\"}\",\"SetValue\":\"{\\\"ValueSource\\\":2,\\\"SubSaveData\\\":{\\\"Constant\\\":\\\"0.0\\\",\\\"BlackboardValue\\\":\\\"{\\\\\\\"BlackboardType\\\\\\\":0,\\\\\\\"Id\\\\\\\":\\\\\\\"\\\\\\\"}\\\",\\\"MessageArgument\\\":\\\"{\\\\\\\"MessageId\\\\\\\":\\\\\\\"Events.CounterReset\\\\\\\",\\\\\\\"Field\\\\\\\":null}\\\"}}\"}},{\"DisplayName\":\"Set number value - Set EVENT GOAL via Message \",\"PresetId\":\"SetValueTree\",\"Id\":\"573bbdaa-4f53-4604-a512-fe8145fbcca9\",\"EnableDebugging\":false,\"TreeFieldData\":{\"TriggerMessage\":\"Events.SetGoal\",\"Score\":\"{\\\"BlackboardType\\\":1,\\\"Id\\\":\\\"78b4080a-3228-4a51-83b0-4cb60db9f008\\\"}\",\"SetValue\":\"{\\\"ValueSource\\\":1,\\\"SubSaveData\\\":{\\\"Constant\\\":\\\"0.0\\\",\\\"BlackboardValue\\\":\\\"{\\\\\\\"BlackboardType\\\\\\\":0,\\\\\\\"Id\\\\\\\":\\\\\\\"\\\\\\\"}\\\",\\\"MessageArgument\\\":\\\"{\\\\\\\"MessageId\\\\\\\":\\\\\\\"Events.SetGoal\\\\\\\",\\\\\\\"Field\\\\\\\":{\\\\\\\"Type\\\\\\\":\\\\\\\"Int\\\\\\\",\\\\\\\"DefaultValue\\\\\\\":0,\\\\\\\"DisplayName\\\\\\\":\\\\\\\"Total Required\\\\\\\",\\\\\\\"UIConfigParameters\\\\\\\":null}}\\\"}}\"}}],\"DisplayName\":\"Event Count & Check - Set Event Goal with message argument, count events, check if goal is met to trigger logic on demand, reset event counter to reuse during play\",\"Description\":null,\"EnableDebugging\":false,\"Id\":\"3e9de119-33ae-4877-aa39-465884dd4393\"}],\"version\":-1,\"dataID\":null}"
  },
  "Type": 0,
  "Messages": {
    "Version": 1,
    "SaveData": "[{\"Enabled\":true,\"SystemMessage\":false,\"Message\":\"Event.Triggered\",\"Color\":\"FFFFFFFF\",\"IsPermanent\":false,\"Parameters\":[],\"Tags\":[\"Default\"],\"HasColor\":false},{\"Enabled\":true,\"SystemMessage\":false,\"Message\":\"Events.Check\",\"Color\":\"FFFFFFFF\",\"IsPermanent\":false,\"Parameters\":[],\"Tags\":[\"Default\"],\"HasColor\":false},{\"Enabled\":true,\"SystemMessage\":false,\"Message\":\"Events.Check\",\"Color\":\"FFFFFFFF\",\"IsPermanent\":false,\"Parameters\":[],\"Tags\":[\"Default\"],\"HasColor\":false},{\"Enabled\":true,\"SystemMessage\":false,\"Message\":\"Events.Done\",\"Color\":\"FFFFFFFF\",\"IsPermanent\":false,\"Parameters\":[],\"Tags\":[\"Default\"],\"HasColor\":false},{\"Enabled\":true,\"SystemMessage\":false,\"Message\":\"Events.CounterReset\",\"Color\":\"FFFFFFFF\",\"IsPermanent\":false,\"Parameters\":[],\"Tags\":[\"Default\"],\"HasColor\":false},{\"Enabled\":true,\"SystemMessage\":false,\"Message\":\"Events.SetGoal\",\"Color\":\"FFFFFFFF\",\"IsPermanent\":false,\"Parameters\":[{\"Type\":\"Int\",\"DefaultValue\":0,\"DisplayName\":\"Total Required\",\"UIConfigParameters\":null}],\"Tags\":[\"Default\"],\"HasColor\":false}]"
  },
  "Fields": {
    "Version": 8,
    "SaveData": "{\"Fields\":[{\"$type\":\"Sandbox.Engine.RuleTrees.RtBlackboardFieldData`1[[System.Int32, mscorlib]], Sandbox.Engine\",\"ConcreteDefaultValue\":0,\"Id\":\"3933e860-af41-4e34-91fc-cc4e6f7adcce\",\"BlackboardType\":1,\"IsSelectable\":true,\"FriendlyName\":\"Event Counter\",\"Mode\":1,\"ValueFormatId\":0},{\"$type\":\"Sandbox.Engine.RuleTrees.RtBlackboardFieldData`1[[System.Int32, mscorlib]], Sandbox.Engine\",\"ConcreteDefaultValue\":0,\"Id\":\"78b4080a-3228-4a51-83b0-4cb60db9f008\",\"BlackboardType\":1,\"IsSelectable\":true,\"FriendlyName\":\"Event Goal\",\"Mode\":1,\"ValueFormatId\":0}],\"version\":-1,\"dataID\":null}"
  }
}
```

{% endtab %}

{% tab title="Integration Notes" %}

### **Integration Notes**

{% hint style="success" %}
The provided [**Event Count & Check Ruleset** ](#event-counter-and-checker-ruleset)combined with the logic below:

* :shield: <mark style="background-color:green;">Avoids an exploit</mark>, forcing each event to be completed once to reach the goal.
* :busts\_in\_silhouette: Counts each player's events uniquely in multiplayer games (local variables).
* :bust\_in\_silhouette: Works in singleplayer games.
* :recycle: Reusable to count other events (messages modify goal and counter).
  {% endhint %}

1. **Set event goal:** Set anything to send the message `Events.SetGoal` to **Rules** or **All** and set the amount in the message argument. **Note:** Trigger logic on demand if this goal is met.
2. **Set up a unique one-time trigger per event:**\
   :information\_source: An event can be any object or Rules logic (e.g., equipped items, consumed items, quick steps in a process, etc.). :warning:Currently, Quests can not be counted.\
   Each event needs to trigger its own <img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2F3Xm5k7N86Ke5uylGJYeA%2Fimage.png?alt=media&#x26;token=f0f775a9-072f-4994-950b-f848b156bb9f" alt="" data-size="line">[message-broadcaster](https://docs.sandbox.game/en/creator/game-maker/docs/behaviours/basic-logic/message-broadcaster "mention") with a unique message. Every **Message Broadcaster** will send the message `Event.Triggered` to **Rules** (<mark style="background-color:green;">**Broadcast Only Once**</mark> <mark style="background-color:green;"></mark><mark style="background-color:green;">toggle set to</mark> <mark style="background-color:green;"></mark><mark style="background-color:green;">**True**</mark>).
3. **Trigger an outcome once/repeatedly:** Send `Events.Done` to **Rules** to check if goal is met.
4. **(Optional) Reuse to count other events:** Reset the goal by sending `Events.SetGoal` with the amount in the argument and `Events.CounterReset` to **Rules**.
   {% endtab %}

{% tab title="Ruleset: How It's Built" %}

### **How It's Built**

1. In [game-rules](https://docs.sandbox.game/en/creator/game-maker/docs/game-rules "mention"), create a number variable with a value of 0. Set is as **Local (L)**. Name it **Event Goal**.
2. Create a number variable with a value of 0. Set it as **Local (L)**. Name it **Event Counter**.
3. Add a [#edit-number-value](https://docs.sandbox.game/en/creator/docs/game-rules/replace-variable-values#edit-number-value "mention") rule. Set its **Required Message** by creating the message `Events.SetGoal` with arguments (click "Edit Argument," choose Number(Integer) as the type, and label it "Total Required"). This lets you set the goal anytime during play and reuse.
4. Add a [#math](https://docs.sandbox.game/en/creator/docs/game-rules/math#math "mention") rule that requires the message `Event.Triggered`. Set it to add 1 to the **Event Counter** variable and save the result as that variable. Send a message out `Events.Check`. This tests to see if the goal is met each time an event is added.
5. Add a [#compare-numbers](https://docs.sandbox.game/en/creator/docs/game-rules/comparisons#compare-numbers "mention") rule that requires the `Events.Check` message sent from the Math rule. Set it to compare the **Event Counter** variable to the **Event Goal** variable, with the condition set to be equal (compare once). Set the **Message to Send** (Out) as `Events.Done`. When the counter equals the goal, the message will be sent.
6. Add a [#edit-number-value](https://docs.sandbox.game/en/creator/docs/game-rules/replace-variable-values#edit-number-value "mention") rule that requires the `Events.CounterReset` message. Set it to modify the **Event Counter** variable to be a fixed value of 0.
7. Follow the **Integration** notes.
   {% endtab %}

{% tab title="Multi Setup" %}

### Multi Event Count & Check

In some cases, you may want to count multiple events at the same time.&#x20;

The similar ruleset below allows you to count and check three types of events at the same time. It uses messages with arguments to send a value to a specific ruleset for setting a goal and triggering an event.

Copy and paste the ruleset below into your gridboard and follow the [**integration notes**](#integration-notes-1) for each event type you will count and check. **Note:** Create new messages with arguments and add rules to track more event types. Delete old messages via Settings in the Edit menu.

```json
{
  "GameplayData": {
    "Version": 20,
    "SaveData": "{\"RulesetDatas\":[{\"TreeDatas\":[{\"DisplayName\":\"Set number value - EVENT A Goal\",\"PresetId\":\"SetValueTree\",\"Id\":\"af47864e-b45e-4b5c-8d38-c2cf788a88ff\",\"EnableDebugging\":false,\"TreeFieldData\":{\"TriggerMessage\":\"Events.SetGoal.multi\",\"Score\":\"{\\\"BlackboardType\\\":1,\\\"Id\\\":\\\"81ca6267-915e-4f42-9778-5fbbad7f26d3\\\"}\",\"SetValue\":\"{\\\"ValueSource\\\":1,\\\"SubSaveData\\\":{\\\"Constant\\\":\\\"0.0\\\",\\\"BlackboardValue\\\":\\\"{\\\\\\\"BlackboardType\\\\\\\":0,\\\\\\\"Id\\\\\\\":\\\\\\\"\\\\\\\"}\\\",\\\"MessageArgument\\\":\\\"{\\\\\\\"MessageId\\\\\\\":\\\\\\\"Events.SetGoal.multi\\\\\\\",\\\\\\\"Field\\\\\\\":{\\\\\\\"Type\\\\\\\":\\\\\\\"Int\\\\\\\",\\\\\\\"DefaultValue\\\\\\\":0,\\\\\\\"DisplayName\\\\\\\":\\\\\\\"Goal A Update\\\\\\\",\\\\\\\"UIConfigParameters\\\\\\\":null}}\\\"}}\"}},{\"DisplayName\":\"Set number value - EVENT B Goal\",\"PresetId\":\"SetValueTree\",\"Id\":\"6349f0b9-0191-46c8-9b69-2bd287ea915d\",\"EnableDebugging\":false,\"TreeFieldData\":{\"TriggerMessage\":\"Events.SetGoal.multi\",\"Score\":\"{\\\"BlackboardType\\\":1,\\\"Id\\\":\\\"2f2fae1a-4b9a-4eae-ab71-60635aca215b\\\"}\",\"SetValue\":\"{\\\"ValueSource\\\":1,\\\"SubSaveData\\\":{\\\"Constant\\\":\\\"0.0\\\",\\\"BlackboardValue\\\":\\\"{\\\\\\\"BlackboardType\\\\\\\":0,\\\\\\\"Id\\\\\\\":\\\\\\\"\\\\\\\"}\\\",\\\"MessageArgument\\\":\\\"{\\\\\\\"MessageId\\\\\\\":\\\\\\\"Events.SetGoal.multi\\\\\\\",\\\\\\\"Field\\\\\\\":{\\\\\\\"Type\\\\\\\":\\\\\\\"Int\\\\\\\",\\\\\\\"DefaultValue\\\\\\\":0,\\\\\\\"DisplayName\\\\\\\":\\\\\\\"Goal B Update\\\\\\\",\\\\\\\"UIConfigParameters\\\\\\\":null}}\\\"}}\"}},{\"DisplayName\":\"Set number value - EVENT C Goal\",\"PresetId\":\"SetValueTree\",\"Id\":\"1e94e2b0-5659-47dc-9049-aa6653f27454\",\"EnableDebugging\":false,\"TreeFieldData\":{\"TriggerMessage\":\"Event.Triggered.multi\",\"Score\":\"{\\\"BlackboardType\\\":1,\\\"Id\\\":\\\"db5d7508-8743-47cd-830b-6c76d4c5ebdd\\\"}\",\"SetValue\":\"{\\\"ValueSource\\\":1,\\\"SubSaveData\\\":{\\\"Constant\\\":\\\"0.0\\\",\\\"BlackboardValue\\\":\\\"{\\\\\\\"BlackboardType\\\\\\\":0,\\\\\\\"Id\\\\\\\":\\\\\\\"\\\\\\\"}\\\",\\\"MessageArgument\\\":\\\"{\\\\\\\"MessageId\\\\\\\":\\\\\\\"Event.Triggered.multi\\\\\\\",\\\\\\\"Field\\\\\\\":{\\\\\\\"Type\\\\\\\":\\\\\\\"Int\\\\\\\",\\\\\\\"DefaultValue\\\\\\\":0,\\\\\\\"DisplayName\\\\\\\":\\\\\\\"Event C +/-\\\\\\\",\\\\\\\"UIConfigParameters\\\\\\\":null}}\\\"}}\"}},{\"DisplayName\":\"Math - EVENT A +/- Event via Message Argument\",\"PresetId\":\"MathTree\",\"Id\":\"f696eac7-5918-422e-843d-e6253c3b9fd3\",\"EnableDebugging\":false,\"TreeFieldData\":{\"TriggerMessage\":\"Event.Triggered.multi\",\"MathOperand1\":\"{\\\"ValueSource\\\":1,\\\"SubSaveData\\\":{\\\"Constant\\\":\\\"0.0\\\",\\\"BlackboardValue\\\":\\\"{\\\\\\\"BlackboardType\\\\\\\":0,\\\\\\\"Id\\\\\\\":\\\\\\\"\\\\\\\"}\\\",\\\"MessageArgument\\\":\\\"{\\\\\\\"MessageId\\\\\\\":\\\\\\\"Event.Triggered.multi\\\\\\\",\\\\\\\"Field\\\\\\\":{\\\\\\\"Type\\\\\\\":\\\\\\\"Int\\\\\\\",\\\\\\\"DefaultValue\\\\\\\":0,\\\\\\\"DisplayName\\\\\\\":\\\\\\\"Event A +/-\\\\\\\",\\\\\\\"UIConfigParameters\\\\\\\":null}}\\\"}}\",\"MathOperator\":\"0\",\"MathOperand2\":\"{\\\"ValueSource\\\":0,\\\"SubSaveData\\\":{\\\"Constant\\\":\\\"0.0\\\",\\\"BlackboardValue\\\":\\\"{\\\\\\\"BlackboardType\\\\\\\":1,\\\\\\\"Id\\\\\\\":\\\\\\\"3933e860-af41-4e34-91fc-cc4e6f7adcce\\\\\\\"}\\\",\\\"MessageArgument\\\":\\\"{\\\\\\\"MessageId\\\\\\\":\\\\\\\"Event.Triggered.multi\\\\\\\",\\\\\\\"Field\\\\\\\":{\\\\\\\"Type\\\\\\\":\\\\\\\"Int\\\\\\\",\\\\\\\"DefaultValue\\\\\\\":0,\\\\\\\"DisplayName\\\\\\\":\\\\\\\"Event A +/-\\\\\\\",\\\\\\\"UIConfigParameters\\\\\\\":null}}\\\"}}\",\"Score\":\"{\\\"BlackboardType\\\":1,\\\"Id\\\":\\\"3933e860-af41-4e34-91fc-cc4e6f7adcce\\\"}\",\"OutgoingMessage\":\"{\\\"MessageId\\\":\\\"Events.Check.A\\\",\\\"ArgumentsData\\\":[]}\"}},{\"DisplayName\":\"Math - EVENT B +/- Event via Message Argument\",\"PresetId\":\"MathTree\",\"Id\":\"d7425ba0-f7b8-4dde-8c7e-b2caac6a1147\",\"EnableDebugging\":false,\"TreeFieldData\":{\"TriggerMessage\":\"Event.Triggered.multi\",\"MathOperand1\":\"{\\\"ValueSource\\\":1,\\\"SubSaveData\\\":{\\\"Constant\\\":\\\"0.0\\\",\\\"BlackboardValue\\\":\\\"{\\\\\\\"BlackboardType\\\\\\\":0,\\\\\\\"Id\\\\\\\":\\\\\\\"\\\\\\\"}\\\",\\\"MessageArgument\\\":\\\"{\\\\\\\"MessageId\\\\\\\":\\\\\\\"Event.Triggered.multi\\\\\\\",\\\\\\\"Field\\\\\\\":{\\\\\\\"Type\\\\\\\":\\\\\\\"Int\\\\\\\",\\\\\\\"DefaultValue\\\\\\\":0,\\\\\\\"DisplayName\\\\\\\":\\\\\\\"Event B +/-\\\\\\\",\\\\\\\"UIConfigParameters\\\\\\\":null}}\\\"}}\",\"MathOperator\":\"0\",\"MathOperand2\":\"{\\\"ValueSource\\\":0,\\\"SubSaveData\\\":{\\\"Constant\\\":\\\"0.0\\\",\\\"BlackboardValue\\\":\\\"{\\\\\\\"BlackboardType\\\\\\\":1,\\\\\\\"Id\\\\\\\":\\\\\\\"621a4f7e-8434-4200-a20b-9d8ae900e939\\\\\\\"}\\\",\\\"MessageArgument\\\":\\\"{\\\\\\\"MessageId\\\\\\\":\\\\\\\"Event.Triggered.multi\\\\\\\",\\\\\\\"Field\\\\\\\":{\\\\\\\"Type\\\\\\\":\\\\\\\"Int\\\\\\\",\\\\\\\"DefaultValue\\\\\\\":0,\\\\\\\"DisplayName\\\\\\\":\\\\\\\"Event A +/-\\\\\\\",\\\\\\\"UIConfigParameters\\\\\\\":null}}\\\"}}\",\"Score\":\"{\\\"BlackboardType\\\":1,\\\"Id\\\":\\\"621a4f7e-8434-4200-a20b-9d8ae900e939\\\"}\",\"OutgoingMessage\":\"{\\\"MessageId\\\":\\\"Events.Check.B\\\",\\\"ArgumentsData\\\":[]}\"}},{\"DisplayName\":\"Math - EVENT C +/- Event via Message Argument\",\"PresetId\":\"MathTree\",\"Id\":\"880a70af-8fdc-4585-898d-d39456dc60d4\",\"EnableDebugging\":false,\"TreeFieldData\":{\"TriggerMessage\":\"Event.Triggered.multi\",\"MathOperand1\":\"{\\\"ValueSource\\\":1,\\\"SubSaveData\\\":{\\\"Constant\\\":\\\"0.0\\\",\\\"BlackboardValue\\\":\\\"{\\\\\\\"BlackboardType\\\\\\\":0,\\\\\\\"Id\\\\\\\":\\\\\\\"\\\\\\\"}\\\",\\\"MessageArgument\\\":\\\"{\\\\\\\"MessageId\\\\\\\":\\\\\\\"Event.Triggered.multi\\\\\\\",\\\\\\\"Field\\\\\\\":{\\\\\\\"Type\\\\\\\":\\\\\\\"Int\\\\\\\",\\\\\\\"DefaultValue\\\\\\\":0,\\\\\\\"DisplayName\\\\\\\":\\\\\\\"Event C +/-\\\\\\\",\\\\\\\"UIConfigParameters\\\\\\\":null}}\\\"}}\",\"MathOperator\":\"0\",\"MathOperand2\":\"{\\\"ValueSource\\\":0,\\\"SubSaveData\\\":{\\\"Constant\\\":\\\"0.0\\\",\\\"BlackboardValue\\\":\\\"{\\\\\\\"BlackboardType\\\\\\\":1,\\\\\\\"Id\\\\\\\":\\\\\\\"ec5ccf43-a442-4062-8f2e-67447dc4f6bd\\\\\\\"}\\\",\\\"MessageArgument\\\":\\\"{\\\\\\\"MessageId\\\\\\\":\\\\\\\"Event.Triggered.multi\\\\\\\",\\\\\\\"Field\\\\\\\":{\\\\\\\"Type\\\\\\\":\\\\\\\"Int\\\\\\\",\\\\\\\"DefaultValue\\\\\\\":0,\\\\\\\"DisplayName\\\\\\\":\\\\\\\"Event A +/-\\\\\\\",\\\\\\\"UIConfigParameters\\\\\\\":null}}\\\"}}\",\"Score\":\"{\\\"BlackboardType\\\":1,\\\"Id\\\":\\\"ec5ccf43-a442-4062-8f2e-67447dc4f6bd\\\"}\",\"OutgoingMessage\":\"{\\\"MessageId\\\":\\\"Events.Check.C\\\",\\\"ArgumentsData\\\":[]}\"}},{\"DisplayName\":\"Compare numbers - EVENT A Check\",\"PresetId\":\"MessageOnAmountTree\",\"Id\":\"3334e9d7-c027-47fc-87f5-a4ca405cc42e\",\"EnableDebugging\":false,\"TreeFieldData\":{\"TriggerMessage\":\"Events.Check.A\",\"Score\":\"{\\\"BlackboardType\\\":1,\\\"Id\\\":\\\"3933e860-af41-4e34-91fc-cc4e6f7adcce\\\"}\",\"Equation\":\"0\",\"ValueSource\":\"{\\\"ValueSource\\\":0,\\\"SubSaveData\\\":{\\\"Constant\\\":\\\"1.0\\\",\\\"BlackboardValue\\\":\\\"{\\\\\\\"BlackboardType\\\\\\\":1,\\\\\\\"Id\\\\\\\":\\\\\\\"81ca6267-915e-4f42-9778-5fbbad7f26d3\\\\\\\"}\\\",\\\"MessageArgument\\\":\\\"{\\\\\\\"MessageId\\\\\\\":\\\\\\\"Events.Check.A\\\\\\\",\\\\\\\"Field\\\\\\\":null}\\\"}}\",\"CreateConditionalEvent\":\"False\",\"OutgoingMessage\":\"{\\\"MessageId\\\":\\\"Events.Done.A\\\",\\\"ArgumentsData\\\":[]}\"}},{\"DisplayName\":\"Compare numbers - EVENT B Check\",\"PresetId\":\"MessageOnAmountTree\",\"Id\":\"b2caae9e-5791-466d-82fa-cd62174d61bf\",\"EnableDebugging\":false,\"TreeFieldData\":{\"TriggerMessage\":\"Events.Check.B\",\"Score\":\"{\\\"BlackboardType\\\":1,\\\"Id\\\":\\\"621a4f7e-8434-4200-a20b-9d8ae900e939\\\"}\",\"Equation\":\"0\",\"ValueSource\":\"{\\\"ValueSource\\\":0,\\\"SubSaveData\\\":{\\\"Constant\\\":\\\"1.0\\\",\\\"BlackboardValue\\\":\\\"{\\\\\\\"BlackboardType\\\\\\\":1,\\\\\\\"Id\\\\\\\":\\\\\\\"2f2fae1a-4b9a-4eae-ab71-60635aca215b\\\\\\\"}\\\",\\\"MessageArgument\\\":\\\"{\\\\\\\"MessageId\\\\\\\":\\\\\\\"Events.Check.B\\\\\\\",\\\\\\\"Field\\\\\\\":null}\\\"}}\",\"CreateConditionalEvent\":\"False\",\"OutgoingMessage\":\"{\\\"MessageId\\\":\\\"Events.Done.B\\\",\\\"ArgumentsData\\\":[]}\"}},{\"DisplayName\":\"Compare numbers - EVENT C Check\",\"PresetId\":\"MessageOnAmountTree\",\"Id\":\"87d48979-437f-439d-afaa-2e1ae4a74007\",\"EnableDebugging\":false,\"TreeFieldData\":{\"TriggerMessage\":\"Events.Check.C\",\"Score\":\"{\\\"BlackboardType\\\":1,\\\"Id\\\":\\\"ec5ccf43-a442-4062-8f2e-67447dc4f6bd\\\"}\",\"Equation\":\"0\",\"ValueSource\":\"{\\\"ValueSource\\\":0,\\\"SubSaveData\\\":{\\\"Constant\\\":\\\"1.0\\\",\\\"BlackboardValue\\\":\\\"{\\\\\\\"BlackboardType\\\\\\\":1,\\\\\\\"Id\\\\\\\":\\\\\\\"db5d7508-8743-47cd-830b-6c76d4c5ebdd\\\\\\\"}\\\",\\\"MessageArgument\\\":\\\"{\\\\\\\"MessageId\\\\\\\":\\\\\\\"Events.Check.C\\\\\\\",\\\\\\\"Field\\\\\\\":null}\\\"}}\",\"CreateConditionalEvent\":\"False\",\"OutgoingMessage\":\"{\\\"MessageId\\\":\\\"Events.Done.C\\\",\\\"ArgumentsData\\\":[]}\"}},{\"DisplayName\":\"Set number value - Reset EVENT A Counter\",\"PresetId\":\"SetValueTree\",\"Id\":\"924276fd-c508-48c1-9063-c2e13ce20794\",\"EnableDebugging\":false,\"TreeFieldData\":{\"TriggerMessage\":\"Events.CounterResetA\",\"Score\":\"{\\\"BlackboardType\\\":1,\\\"Id\\\":\\\"3933e860-af41-4e34-91fc-cc4e6f7adcce\\\"}\",\"SetValue\":\"{\\\"ValueSource\\\":2,\\\"SubSaveData\\\":{\\\"Constant\\\":\\\"0.0\\\",\\\"BlackboardValue\\\":\\\"{\\\\\\\"BlackboardType\\\\\\\":0,\\\\\\\"Id\\\\\\\":\\\\\\\"\\\\\\\"}\\\",\\\"MessageArgument\\\":\\\"{\\\\\\\"MessageId\\\\\\\":\\\\\\\"Events.CounterResetA\\\\\\\",\\\\\\\"Field\\\\\\\":null}\\\"}}\"}},{\"DisplayName\":\"Set number value - Reset EVENT B Counter\",\"PresetId\":\"SetValueTree\",\"Id\":\"c677d237-bead-4e87-b698-e035c418ec36\",\"EnableDebugging\":false,\"TreeFieldData\":{\"TriggerMessage\":\"Events.CounterResetB\",\"Score\":\"{\\\"BlackboardType\\\":1,\\\"Id\\\":\\\"621a4f7e-8434-4200-a20b-9d8ae900e939\\\"}\",\"SetValue\":\"{\\\"ValueSource\\\":2,\\\"SubSaveData\\\":{\\\"Constant\\\":\\\"0.0\\\",\\\"BlackboardValue\\\":\\\"{\\\\\\\"BlackboardType\\\\\\\":0,\\\\\\\"Id\\\\\\\":\\\\\\\"\\\\\\\"}\\\",\\\"MessageArgument\\\":\\\"{\\\\\\\"MessageId\\\\\\\":\\\\\\\"Events.CounterResetB\\\\\\\",\\\\\\\"Field\\\\\\\":null}\\\"}}\"}},{\"DisplayName\":\"Set number value - Reset EVENT C Counter\",\"PresetId\":\"SetValueTree\",\"Id\":\"5ddaac2f-1039-424d-b3a7-10e66ae86028\",\"EnableDebugging\":false,\"TreeFieldData\":{\"TriggerMessage\":\"Events.CounterResetC\",\"Score\":\"{\\\"BlackboardType\\\":1,\\\"Id\\\":\\\"ec5ccf43-a442-4062-8f2e-67447dc4f6bd\\\"}\",\"SetValue\":\"{\\\"ValueSource\\\":2,\\\"SubSaveData\\\":{\\\"Constant\\\":\\\"0.0\\\",\\\"BlackboardValue\\\":\\\"{\\\\\\\"BlackboardType\\\\\\\":0,\\\\\\\"Id\\\\\\\":\\\\\\\"\\\\\\\"}\\\",\\\"MessageArgument\\\":\\\"{\\\\\\\"MessageId\\\\\\\":\\\\\\\"Events.CounterResetC\\\\\\\",\\\\\\\"Field\\\\\\\":null}\\\"}}\"}}],\"DisplayName\":\"Multi Event Count & Check (Set 3 event counter goals, message argument to add/subtract to specified counters, compare goals to counters, and reset counters to reuse)  \",\"Description\":null,\"EnableDebugging\":false,\"Id\":\"1abbe453-f27c-4ab2-999e-d1512db516f2\"}],\"version\":-1,\"dataID\":null}"
  },
  "Type": 0,
  "Messages": {
    "Version": 1,
    "SaveData": "[{\"Enabled\":true,\"SystemMessage\":false,\"Message\":\"Events.SetGoal.multi\",\"Color\":\"FFFFFFFF\",\"IsPermanent\":false,\"Parameters\":[{\"Type\":\"Int\",\"DefaultValue\":0,\"DisplayName\":\"Goal A Update\",\"UIConfigParameters\":null},{\"Type\":\"Int\",\"DefaultValue\":0,\"DisplayName\":\"Goal B Update\",\"UIConfigParameters\":null},{\"Type\":\"Int\",\"DefaultValue\":0,\"DisplayName\":\"Goal C Update\",\"UIConfigParameters\":null}],\"Tags\":[\"Default\"],\"HasColor\":false},{\"Enabled\":true,\"SystemMessage\":false,\"Message\":\"Events.SetGoal.multi\",\"Color\":\"FFFFFFFF\",\"IsPermanent\":false,\"Parameters\":[{\"Type\":\"Int\",\"DefaultValue\":0,\"DisplayName\":\"Goal A Update\",\"UIConfigParameters\":null},{\"Type\":\"Int\",\"DefaultValue\":0,\"DisplayName\":\"Goal B Update\",\"UIConfigParameters\":null},{\"Type\":\"Int\",\"DefaultValue\":0,\"DisplayName\":\"Goal C Update\",\"UIConfigParameters\":null}],\"Tags\":[\"Default\"],\"HasColor\":false},{\"Enabled\":true,\"SystemMessage\":false,\"Message\":\"Event.Triggered.multi\",\"Color\":\"FFFFFFFF\",\"IsPermanent\":false,\"Parameters\":[{\"Type\":\"Int\",\"DefaultValue\":0,\"DisplayName\":\"Event A +/-\",\"UIConfigParameters\":null},{\"Type\":\"Int\",\"DefaultValue\":0,\"DisplayName\":\"Event B +/-\",\"UIConfigParameters\":null},{\"Type\":\"Int\",\"DefaultValue\":0,\"DisplayName\":\"Event C +/-\",\"UIConfigParameters\":null}],\"Tags\":[\"Default\"],\"HasColor\":false},{\"Enabled\":true,\"SystemMessage\":false,\"Message\":\"Event.Triggered.multi\",\"Color\":\"FFFFFFFF\",\"IsPermanent\":false,\"Parameters\":[{\"Type\":\"Int\",\"DefaultValue\":0,\"DisplayName\":\"Event A +/-\",\"UIConfigParameters\":null},{\"Type\":\"Int\",\"DefaultValue\":0,\"DisplayName\":\"Event B +/-\",\"UIConfigParameters\":null},{\"Type\":\"Int\",\"DefaultValue\":0,\"DisplayName\":\"Event C +/-\",\"UIConfigParameters\":null}],\"Tags\":[\"Default\"],\"HasColor\":false},{\"Enabled\":true,\"SystemMessage\":false,\"Message\":\"Events.Check.A\",\"Color\":\"FFFFFFFF\",\"IsPermanent\":false,\"Parameters\":[],\"Tags\":[\"Default\"],\"HasColor\":false},{\"Enabled\":true,\"SystemMessage\":false,\"Message\":\"Event.Triggered.multi\",\"Color\":\"FFFFFFFF\",\"IsPermanent\":false,\"Parameters\":[{\"Type\":\"Int\",\"DefaultValue\":0,\"DisplayName\":\"Event A +/-\",\"UIConfigParameters\":null},{\"Type\":\"Int\",\"DefaultValue\":0,\"DisplayName\":\"Event B +/-\",\"UIConfigParameters\":null},{\"Type\":\"Int\",\"DefaultValue\":0,\"DisplayName\":\"Event C +/-\",\"UIConfigParameters\":null}],\"Tags\":[\"Default\"],\"HasColor\":false},{\"Enabled\":true,\"SystemMessage\":false,\"Message\":\"Events.Check.B\",\"Color\":\"FFFFFFFF\",\"IsPermanent\":false,\"Parameters\":[],\"Tags\":[\"Default\"],\"HasColor\":false},{\"Enabled\":true,\"SystemMessage\":false,\"Message\":\"Event.Triggered.multi\",\"Color\":\"FFFFFFFF\",\"IsPermanent\":false,\"Parameters\":[{\"Type\":\"Int\",\"DefaultValue\":0,\"DisplayName\":\"Event A +/-\",\"UIConfigParameters\":null},{\"Type\":\"Int\",\"DefaultValue\":0,\"DisplayName\":\"Event B +/-\",\"UIConfigParameters\":null},{\"Type\":\"Int\",\"DefaultValue\":0,\"DisplayName\":\"Event C +/-\",\"UIConfigParameters\":null}],\"Tags\":[\"Default\"],\"HasColor\":false},{\"Enabled\":true,\"SystemMessage\":false,\"Message\":\"Events.Check.C\",\"Color\":\"FFFFFFFF\",\"IsPermanent\":false,\"Parameters\":[],\"Tags\":[\"Default\"],\"HasColor\":false},{\"Enabled\":true,\"SystemMessage\":false,\"Message\":\"Events.Check.A\",\"Color\":\"FFFFFFFF\",\"IsPermanent\":false,\"Parameters\":[],\"Tags\":[\"Default\"],\"HasColor\":false},{\"Enabled\":true,\"SystemMessage\":false,\"Message\":\"Events.Done.A\",\"Color\":\"FFFFFFFF\",\"IsPermanent\":false,\"Parameters\":[],\"Tags\":[\"Default\"],\"HasColor\":false},{\"Enabled\":true,\"SystemMessage\":false,\"Message\":\"Events.Check.B\",\"Color\":\"FFFFFFFF\",\"IsPermanent\":false,\"Parameters\":[],\"Tags\":[\"Default\"],\"HasColor\":false},{\"Enabled\":true,\"SystemMessage\":false,\"Message\":\"Events.Done.B\",\"Color\":\"FFFFFFFF\",\"IsPermanent\":false,\"Parameters\":[],\"Tags\":[\"Default\"],\"HasColor\":false},{\"Enabled\":true,\"SystemMessage\":false,\"Message\":\"Events.Check.C\",\"Color\":\"FFFFFFFF\",\"IsPermanent\":false,\"Parameters\":[],\"Tags\":[\"Default\"],\"HasColor\":false},{\"Enabled\":true,\"SystemMessage\":false,\"Message\":\"Events.Done.C\",\"Color\":\"FFFFFFFF\",\"IsPermanent\":false,\"Parameters\":[],\"Tags\":[\"Default\"],\"HasColor\":false},{\"Enabled\":true,\"SystemMessage\":false,\"Message\":\"Events.CounterResetA\",\"Color\":\"FFFFFFFF\",\"IsPermanent\":false,\"Parameters\":[],\"Tags\":[\"Default\"],\"HasColor\":false},{\"Enabled\":true,\"SystemMessage\":false,\"Message\":\"Events.CounterResetB\",\"Color\":\"FFFFFFFF\",\"IsPermanent\":false,\"Parameters\":[],\"Tags\":[\"Default\"],\"HasColor\":false},{\"Enabled\":true,\"SystemMessage\":false,\"Message\":\"Events.CounterResetC\",\"Color\":\"FFFFFFFF\",\"IsPermanent\":false,\"Parameters\":[],\"Tags\":[\"Default\"],\"HasColor\":false}]"
  },
  "Fields": {
    "Version": 8,
    "SaveData": "{\"Fields\":[{\"$type\":\"Sandbox.Engine.RuleTrees.RtBlackboardFieldData`1[[System.Int32, mscorlib]], Sandbox.Engine\",\"ConcreteDefaultValue\":1,\"Id\":\"81ca6267-915e-4f42-9778-5fbbad7f26d3\",\"BlackboardType\":1,\"IsSelectable\":true,\"FriendlyName\":\"Event A Goal\",\"Mode\":1,\"ValueFormatId\":0},{\"$type\":\"Sandbox.Engine.RuleTrees.RtBlackboardFieldData`1[[System.Int32, mscorlib]], Sandbox.Engine\",\"ConcreteDefaultValue\":1,\"Id\":\"2f2fae1a-4b9a-4eae-ab71-60635aca215b\",\"BlackboardType\":1,\"IsSelectable\":true,\"FriendlyName\":\"Event B Goal\",\"Mode\":1,\"ValueFormatId\":0},{\"$type\":\"Sandbox.Engine.RuleTrees.RtBlackboardFieldData`1[[System.Int32, mscorlib]], Sandbox.Engine\",\"ConcreteDefaultValue\":1,\"Id\":\"db5d7508-8743-47cd-830b-6c76d4c5ebdd\",\"BlackboardType\":1,\"IsSelectable\":true,\"FriendlyName\":\"Event C Goal\",\"Mode\":1,\"ValueFormatId\":0},{\"$type\":\"Sandbox.Engine.RuleTrees.RtBlackboardFieldData`1[[System.Int32, mscorlib]], Sandbox.Engine\",\"ConcreteDefaultValue\":0,\"Id\":\"3933e860-af41-4e34-91fc-cc4e6f7adcce\",\"BlackboardType\":1,\"IsSelectable\":true,\"FriendlyName\":\"Event Counter A\",\"Mode\":1,\"ValueFormatId\":0},{\"$type\":\"Sandbox.Engine.RuleTrees.RtBlackboardFieldData`1[[System.Int32, mscorlib]], Sandbox.Engine\",\"ConcreteDefaultValue\":0,\"Id\":\"621a4f7e-8434-4200-a20b-9d8ae900e939\",\"BlackboardType\":1,\"IsSelectable\":true,\"FriendlyName\":\"Event Counter B\",\"Mode\":1,\"ValueFormatId\":0},{\"$type\":\"Sandbox.Engine.RuleTrees.RtBlackboardFieldData`1[[System.Int32, mscorlib]], Sandbox.Engine\",\"ConcreteDefaultValue\":0,\"Id\":\"ec5ccf43-a442-4062-8f2e-67447dc4f6bd\",\"BlackboardType\":1,\"IsSelectable\":true,\"FriendlyName\":\"Event Counter C\",\"Mode\":1,\"ValueFormatId\":0}],\"version\":-1,\"dataID\":null}"
  }
}
```

{% endtab %}
{% endtabs %}

## 3. Experience Outcome(s)

<table data-card-size="large" data-view="cards"><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td><a href="#world-gameplay"><strong>WORLD/GAMEPLAY</strong></a></td><td><p><strong>Simple or Complex Trigger</strong></p><ul><li><a href="#unlock-npc-interactions">Unlock NPC Interactions</a></li><li><a href="#trigger-unique-quests">Trigger Unique Quests</a></li></ul></td><td><p><strong>Complex Trigger</strong></p><ul><li><a href="#trigger-unique-interactions">Trigger Unique Interactions</a></li><li><a href="#avoid-hazards">Avoid Hazards</a></li><li><a href="#toggle-between-states">Toggle Between States</a></li></ul></td></tr><tr><td><a href="#players"><strong>PLAYERS</strong></a></td><td><p><strong>Simple or Complex Trigger</strong></p><ul><li><a href="#enhance-player-with-equipment-attributes">Enhance Player with Equipment Attributes</a> <strong>(</strong><mark style="color:yellow;"><strong>Power</strong></mark><strong>, </strong><mark style="color:blue;"><strong>Speed</strong></mark><strong>, </strong><mark style="color:red;"><strong>Defense</strong></mark><strong>)</strong> </li><li><a href="#injure-or-curse-the-player">Injure or Curse the Player</a></li><li><p><a href="#trigger-power-ups">Trigger Power Ups (Speed, Attack Power, Damage Resistance, Health, Oxygen)</a></p><p>Once, Repeated (for a time), Forever, Key Input with Cooldown</p></li></ul></td><td><p><strong>Complex Trigger</strong></p><ul><li><a href="#trigger-crowd-events">Trigger Crowd Events</a></li><li><a href="#unlock-player-class-skills">Unlock Player Class/Skills</a></li><li><a href="#activate-equipment">Activate Equipment</a></li></ul></td></tr></tbody></table>

***

## WORLD/GAMEPLAY

### Unlock NPC Interactions

Wear equipment to make NPCs recognise player identity, unlocking dialogue and gameplay.

**Use cases:** Reveal player identity in narrative, access gameplay under disguise, etc.

{% tabs %}
{% tab title="How it Works" %}
**Start:** Initially, NPCs refuse to talk to the player or hint at needed equipment.

**Gameplay Steps**

1. **Get Equipment:** Discover via hints/exploration or receive from an NPC for a quest
2. **Hint:** Learn what the equipment is/does and how to equip it
3. **Equip Item(s):** Open Inventory and equip required assets (one or multiple items)
4. **Hint:** Return to the NPC and talk again

**Outcome:** Trigger unlocked dialogue. This could be set up to grant access to a restricted area, open a door, offer a new quest, etc.
{% endtab %}

{% tab title="Build It" %}

### **Build It**

* **NPC:**
  * ![](https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2Fe3VONdgy8QfCGAG04kRu%2Fimage.png?alt=media\&token=6e0d3ae4-5cad-4c4f-8b66-255d2b6ab630)[asker](https://docs.sandbox.game/en/creator/game-maker/docs/behaviours/basic-logic/asker "mention") behaviour - hint that the player must wear the right item(s) to prove their identity or be ready for something.
  * ![](https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FpvQ37hvZsM8OoxPTibkV%2Fimage.png?alt=media\&token=e5d1560b-bfb4-4e26-a79a-b2f2241ae0ee)[toggle](https://docs.sandbox.game/en/creator/game-maker/docs/components/status/toggle "mention") <mark style="color:red;">OFF</mark> with `Events.Done` (multiple items) or <mark style="background-color:orange;">**On Equip**</mark> message (one item).
* **Logic Asset (NPC hidden dialogue):**
  * ![](https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2Fe3VONdgy8QfCGAG04kRu%2Fimage.png?alt=media\&token=6e0d3ae4-5cad-4c4f-8b66-255d2b6ab630)[asker](https://docs.sandbox.game/en/creator/game-maker/docs/behaviours/basic-logic/asker "mention") behaviour - informs player to proceed since they are wearing correct items.
  * ![](https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FpvQ37hvZsM8OoxPTibkV%2Fimage.png?alt=media\&token=e5d1560b-bfb4-4e26-a79a-b2f2241ae0ee)[toggle](https://docs.sandbox.game/en/creator/game-maker/docs/components/status/toggle "mention") <mark style="color:green;">ON</mark> with `Events.Done` (multiple items) or <mark style="background-color:orange;">**On Equip**</mark> message (one item). Initial state **False**.
* **Equipment:**&#x20;
  * <img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2F1DuMFnUv13lWbbezqP9i%2Fimage.png?alt=media&#x26;token=adf11682-9ef9-4c07-93cb-df017f00ade8" alt="" data-size="line">[collectable](https://docs.sandbox.game/en/creator/game-maker/docs/components/actions/collectable "mention") component - <mark style="background-color:orange;">**On Equip**</mark> message (one item), <mark style="background-color:purple;">**Collect**</mark> message.
  * **For multiple equipment:** Also apply **\[**[**Event Count & Check**](#use-on-equip-message-s--event-count-and-check-setup)**]** logic to count events (equipping items) individually and check if an event total is met.
* **Hint:&#x20;**<mark style="background-color:purple;">**Collect**</mark> message triggers an ![](https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2Fe3VONdgy8QfCGAG04kRu%2Fimage.png?alt=media\&token=6e0d3ae4-5cad-4c4f-8b66-255d2b6ab630)[asker](https://docs.sandbox.game/en/creator/game-maker/docs/behaviours/basic-logic/asker "mention") or [#popup-window](https://docs.sandbox.game/en/creator/docs/game-rules/game-screen#popup-window "mention") telling the player to equip the item(s) and how.
* **Hint:&#x20;**<mark style="background-color:orange;">**On Equip**</mark> message (one item) or `Events.Done` (multiple items) triggers ![](https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2Fe3VONdgy8QfCGAG04kRu%2Fimage.png?alt=media\&token=6e0d3ae4-5cad-4c4f-8b66-255d2b6ab630)[asker](https://docs.sandbox.game/en/creator/game-maker/docs/behaviours/basic-logic/asker "mention") or [#popup-window](https://docs.sandbox.game/en/creator/docs/game-rules/game-screen#popup-window "mention") that reminds the player to return to the NPC (for unlocked dialogue).

**Follow Up:**

* Set up additional gameplay of your choice triggered by the NPC's new dialogue.
  {% endtab %}

{% tab title="Example: Identity" %}

### Roman Soldier Quest

A Roman soldier is urgently looking for another soldier to help him. When you speak to him, he tells you to go away because he's busy looking for a soldier. Go on a quest to acquire a full set of Roman armour. Return to him with the full armour set equipped, and he will finally ask for your help in killing a powerful enemy.&#x20;

**Unlocked Gameplay**\
He instructs you to grab a spear to attack the enemy. The spear will only spawn if you have a full set of armour equipped.

<figure><img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FeZL6RKRlzjGTAn8jg56j%2FNPC%20Dialogue%20Branch%20trim.gif?alt=media&#x26;token=b5ca8183-e549-4a74-84b2-2a60a189eeeb" alt=""><figcaption><p>Roman Soldier Quest Example</p></figcaption></figure>
{% endtab %}

{% tab title="Example: Access" %}

### **Party Entry**

You are trying to get into a party, but you are not dressed in a suit and tie, so the guard will not let you in. Find a suit and return. The guard will notice you are dressed correctly and let you in.

**Unlocked Gameplay**\
Any playable content inside of the party space is now available.
{% endtab %}
{% endtabs %}

### Trigger Unique Quests

Wear equipment to unlock information that will trigger a quest to begin.

**Use cases:** Puzzles, mysteries, translation, etc.

{% tabs %}
{% tab title="How it Works" %}
**Start:** When the player interacts with something interesting, they learn that they are unable to read/understand it without certain equipment.

**Gameplay Steps**

1. **Get Equipment:** Discover via hints/exploration or buy/trade/craft
2. **Hint:** Learn what the item is/does and how to equip it
3. **Equip Item(s):** Open Inventory and equip the asset
4. **Hint:** Return to try interacting with the original item

**Outcome:** The equipment allowed the player to complete or read some text, narrative, small puzzle, or map, so a quest is unlocked. This may lead the player to a hidden location or unlock other gameplay.
{% endtab %}

{% tab title="Build It" %}

### **Build It**

* **NPC:**
  * ![](https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2Fe3VONdgy8QfCGAG04kRu%2Fimage.png?alt=media\&token=6e0d3ae4-5cad-4c4f-8b66-255d2b6ab630)[asker](https://docs.sandbox.game/en/creator/game-maker/docs/behaviours/basic-logic/asker "mention") behaviour - hint that the player must equip certain items to read/understand something for a quest.
  * ![](https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FpvQ37hvZsM8OoxPTibkV%2Fimage.png?alt=media\&token=e5d1560b-bfb4-4e26-a79a-b2f2241ae0ee)[toggle](https://docs.sandbox.game/en/creator/game-maker/docs/components/status/toggle "mention") <mark style="color:red;">OFF</mark> with `Events.Done` (multiple items) or <mark style="background-color:orange;">**On Equip**</mark> message (one item).
* **Logic Asset (hint):**
  * ![](https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2Fe3VONdgy8QfCGAG04kRu%2Fimage.png?alt=media\&token=6e0d3ae4-5cad-4c4f-8b66-255d2b6ab630)[asker](https://docs.sandbox.game/en/creator/game-maker/docs/behaviours/basic-logic/asker "mention") behaviour - informs player the equipped item contains the information they needed, makes it possible to understand what they were trying to read, etc.
    * The <mark style="background-color:blue;">Asker response</mark> sends a message to **Objectives** or **All**.
  * ![](https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FpvQ37hvZsM8OoxPTibkV%2Fimage.png?alt=media\&token=e5d1560b-bfb4-4e26-a79a-b2f2241ae0ee)[toggle](https://docs.sandbox.game/en/creator/game-maker/docs/components/status/toggle "mention") <mark style="color:green;">ON</mark> with `Events.Done` (multiple items) or <mark style="background-color:orange;">**On Equip**</mark> message (one item). Initial state **False**.
* **Quest:** Add a [**quest**](https://docs.sandbox.game/en/creator/docs/objectives#quest-steps) of your choice that launches with the <mark style="background-color:blue;">Asker response</mark> message.
* **Polish:** Use the <mark style="background-color:blue;">Asker response</mark> message to trigger a visual cue that the item is readable (e.g., VFX, animated decoration behaviour to display an animation, etc.).
* **Equipment:**&#x20;
  * <img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2F1DuMFnUv13lWbbezqP9i%2Fimage.png?alt=media&#x26;token=adf11682-9ef9-4c07-93cb-df017f00ade8" alt="" data-size="line">[collectable](https://docs.sandbox.game/en/creator/game-maker/docs/components/actions/collectable "mention") component - <mark style="background-color:orange;">**On Equip**</mark> message (one item), <mark style="background-color:purple;">**Collect**</mark> message.
  * **For multiple equipment:** Also apply **\[**[**Event Count & Check**](#use-on-equip-message-s--event-count-and-check-setup)**]** logic to count events (equipping items) individually and check if an event total is met.
* **Check:**&#x20;
  * <img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FIaOSCnmODVvwrVbCZ3HY%2FGM%20icon%20com%20trigger%20volume.png?alt=media&#x26;token=4b3659f2-40cf-4df3-a6d7-18f16d42c73b" alt="" data-size="line">[trigger-volume](https://docs.sandbox.game/en/creator/game-maker/docs/components/triggers/trigger-volume "mention") in front of the object the player is attempting to read/understand sends `Events.Check` to **Rules** or **All** to test if equipment has been worn.
* **Hint:&#x20;**<mark style="background-color:purple;">**Collect**</mark> message triggers an ![](https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2Fe3VONdgy8QfCGAG04kRu%2Fimage.png?alt=media\&token=6e0d3ae4-5cad-4c4f-8b66-255d2b6ab630)[asker](https://docs.sandbox.game/en/creator/game-maker/docs/behaviours/basic-logic/asker "mention") or [#popup-window](https://docs.sandbox.game/en/creator/docs/game-rules/game-screen#popup-window "mention") telling the player to equip the item(s) and how.
* **Hint:&#x20;**<mark style="background-color:orange;">**On Equip**</mark> message (one item) or `Events.Done` (multiple items) triggers ![](https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2Fe3VONdgy8QfCGAG04kRu%2Fimage.png?alt=media\&token=6e0d3ae4-5cad-4c4f-8b66-255d2b6ab630)[asker](https://docs.sandbox.game/en/creator/game-maker/docs/behaviours/basic-logic/asker "mention") or [#popup-window](https://docs.sandbox.game/en/creator/docs/game-rules/game-screen#popup-window "mention") that reminds the player to return to the item that couldn't be read.

**Follow Up:**

* Set up additional objects and [#quest-cursors](https://docs.sandbox.game/en/creator/game-maker/creative-guides/text-quests-and-icons#quest-cursors "mention") for the triggered quest.
  {% endtab %}

{% tab title="Example: Map" %}

### **Treasure Hunter**

You are a treasure hunter who comes across an ancient map in an unknown language. You must use a backpack of tools to find a way to translate it. The locals give you a tip about an old tomb with strange carvings outside the entrance. When you check these, you can read part of the tablet, which indicates you need to explore the tomb to translate the rest. Explore the tomb to find clues from artifacts and collect pieces of ancient books to decode the whole tablet.

**Unlocked Gameplay**\
Once you have enough information, you'll discover what mysteries await.

<figure><img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FKX4ni2M1LBqxxllNXFXZ%2FTrigger%20Unique%20Quests%20trim.gif?alt=media&#x26;token=567ca140-67e3-48bd-b818-5831e5147c94" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Example: Translation Book" %}

### **Language Barrier**

You speak to an NPC, but they talk to you in a language you do not understand. You need to get past them, but they keep saying something you can't comprehend. Using a local translation book, you manage to communicate with them. They tell you they need 50 gold coins to let you pass and give you a quest to find the money. Using the book, you interact with other NPCs and find ways to help them to gather the money needed to progress.

**Unlocked Gameplay**\
After paying gold coins to the NPC, you can move on to new areas and quests.

Take this further by allowing the player to speak with other NPCs who speak the same language and hint at the player to revisit earlier areas of the game where the language barrier prevented them from reading signs, books, etc. as part of a new quest, leveling up, etc.
{% endtab %}
{% endtabs %}

### Trigger Unique Interactions

Wear equipment to unlock new ways to interact with items or engage with the game world.

**Use cases:** Use tools for specified actions, carry heavy or special items, etc.

{% hint style="info" %}
In multiplayer Experiences, each player can have a unique gameplay experience based on the equipment they find and use.
{% endhint %}

{% tabs %}
{% tab title="How it Works" %}
**Start:** When the player interacts with an object, they learn that they need certain equipment to interact with the item to complete a task.

**Gameplay Steps**

1. **Get Equipment:** Discover via hints/exploration, buy/trade/craft, or receive from an NPC
2. **Hint:** Learn what the item is/does and how to equip it
3. **Equip:** Open Inventory and equip the asset
4. **Hint:** Learn that the equipment has unlocked what needs to be done using it

**Outcome:** The player may now complete a task using the equipment. This may a one time action, a repeated task, or a series of tasks as part of a process (e.g., manufacturing a product).

It may also lead to buying equipment that is more powerful/faster to complete the task/process, which is common in a [resource-management](https://docs.sandbox.game/en/creator/game-maker/creative-guides/experience-guide/resource-management "mention") game.
{% endtab %}

{% tab title="Build It" %}

### **Build It**

**Equipment/Object Setup**

* **Object:** Upon avatar detection or interaction, a ![](https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FWRGkJ8Fzm0LsFE07kTxT%2Fimage.png?alt=media\&token=cce224ac-ea7a-436a-b69d-4fe680dbef9b)[speaker](https://docs.sandbox.game/en/creator/game-maker/docs/components/actions/speaker "mention") component sends a message to a [#popup-window](https://docs.sandbox.game/en/creator/docs/game-rules/game-screen#popup-window "mention") that informs the player what equipment is needed to interact with the object and where/how to get it.
* **Equipment:** <img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2F1DuMFnUv13lWbbezqP9i%2Fimage.png?alt=media&#x26;token=adf11682-9ef9-4c07-93cb-df017f00ade8" alt="" data-size="line">[collectable](https://docs.sandbox.game/en/creator/game-maker/docs/components/actions/collectable "mention") component - <mark style="background-color:orange;">**On Equip**</mark> message (one item), <mark style="background-color:purple;">**Collect**</mark> message. Use \[[**Event Count & Check**](#event-count-and-check)] logic to be able to trigger new interactions repeatedly.
* **Hint:** <mark style="background-color:purple;">**Collect**</mark> message triggers a [#popup-window](https://docs.sandbox.game/en/creator/docs/game-rules/game-screen#popup-window "mention") informing player how to equip the item and what to do with it.
* **Object Interactions (some options):**
  * **Spawn Items Upon Interaction (e.g., fruit):** <img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FrFFcp9Gy4XHBzf1svCMl%2Fimage.png?alt=media&#x26;token=c31bc0a1-8009-4fef-8e4c-cde4f1648a28" alt="" data-size="line">[asset-spawner](https://docs.sandbox.game/en/creator/game-maker/docs/behaviours/modifiers/asset-spawner "mention") behaviour with [toggle](https://docs.sandbox.game/en/creator/game-maker/docs/components/status/toggle "mention") <mark style="color:green;">ON</mark> from <mark style="background-color:orange;">**On Equip**</mark> message, triggered to spawn with `Interact` message.
    * **Polish (options):** Instead of **Asset Spawner**, use ![](https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2F8pfJ8AyJCjcqKB8pMliL%2Fimage.png?alt=media\&token=c1292d0a-1c0e-4420-b21b-9c48cc1ff28e)[replace-asset](https://docs.sandbox.game/en/creator/game-maker/docs/behaviours/modifiers/replace-asset "mention") triggered by the <mark style="background-color:orange;">**On Equip**</mark> message. Replace with an identical asset with a ![](https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FgjIa5gmMlUBBT4vkEJbE%2Fimage.png?alt=media\&token=11f97d8d-24bf-46fb-9320-f518d20c2373)[drop](https://docs.sandbox.game/en/creator/game-maker/docs/components/actions/drop "mention") component to drop a preset of objects upon interaction:
      * **Items spring outward:** place close together with gravity and collisions on
      * **Pick up objects:** ![](https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FHooLbmtByAhogU0mIGo7%2Fimage.png?alt=media\&token=ce83c192-01ac-42ef-a3de-c5b10066089d)[pickable](https://docs.sandbox.game/en/creator/game-maker/docs/components/actions/pickable "mention") and ![](https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FCL2QncHKRFIMjyA8fxKT%2Fimage.png?alt=media\&token=923fa309-5700-4f87-bb68-ae76de4fb5b9)[health](https://docs.sandbox.game/en/creator/game-maker/docs/components/status/health "mention") components&#x20;
      * **Collect objects, count resources:** <img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2F1DuMFnUv13lWbbezqP9i%2Fimage.png?alt=media&#x26;token=adf11682-9ef9-4c07-93cb-df017f00ade8" alt="" data-size="line">[collectable](https://docs.sandbox.game/en/creator/game-maker/docs/components/actions/collectable "mention") component with <mark style="background-color:blue;">**Collect**</mark> message, number (integer) variable for item count, [#hud](https://docs.sandbox.game/en/creator/docs/game-rules/game-screen#hud "mention") rule to display variable, [#math](https://docs.sandbox.game/en/creator/docs/game-rules/math#math "mention") rule adds 1 to the variable when <mark style="background-color:blue;">**Collect**</mark> message is received.&#x20;
  * **Spawn Items to Use:** ![](https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2F8pfJ8AyJCjcqKB8pMliL%2Fimage.png?alt=media\&token=c1292d0a-1c0e-4420-b21b-9c48cc1ff28e)[replace-asset](https://docs.sandbox.game/en/creator/game-maker/docs/behaviours/modifiers/replace-asset "mention") behaviour triggered by <mark style="background-color:orange;">**On Equip**</mark> message that replaces with a preset:
    * **Carry/Detect:** ![](https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FHooLbmtByAhogU0mIGo7%2Fimage.png?alt=media\&token=ce83c192-01ac-42ef-a3de-c5b10066089d)[pickable](https://docs.sandbox.game/en/creator/game-maker/docs/components/actions/pickable "mention") with tag.
    * **Shoot Projectile:** ![](https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FHooLbmtByAhogU0mIGo7%2Fimage.png?alt=media\&token=ce83c192-01ac-42ef-a3de-c5b10066089d)[pickable](https://docs.sandbox.game/en/creator/game-maker/docs/components/actions/pickable "mention") with child <img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FrFFcp9Gy4XHBzf1svCMl%2Fimage.png?alt=media&#x26;token=c31bc0a1-8009-4fef-8e4c-cde4f1648a28" alt="" data-size="line">[asset-spawner](https://docs.sandbox.game/en/creator/game-maker/docs/behaviours/modifiers/asset-spawner "mention") triggered by <mark style="background-color:orange;">**On Equip**</mark>, which spawns <img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2Fk7kymlTwMbPytgwSwnBP%2Fimage.png?alt=media&#x26;token=a8c8f87f-f834-496c-9cb0-89361526ea6c" alt="" data-size="line">[projectile](https://docs.sandbox.game/en/creator/game-maker/docs/behaviours/movement/projectile "mention") triggered by a [#key-input](https://docs.sandbox.game/en/creator/docs/game-rules/triggers#key-input "mention").
  * **Set Spawned Items to Trigger Logic When Destroyed:** Use <img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FrFFcp9Gy4XHBzf1svCMl%2Fimage.png?alt=media&#x26;token=c31bc0a1-8009-4fef-8e4c-cde4f1648a28" alt="" data-size="line">[asset-spawner](https://docs.sandbox.game/en/creator/game-maker/docs/behaviours/modifiers/asset-spawner "mention") to spawn an object with a ![](https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FCL2QncHKRFIMjyA8fxKT%2Fimage.png?alt=media\&token=923fa309-5700-4f87-bb68-ae76de4fb5b9)[health](https://docs.sandbox.game/en/creator/game-maker/docs/components/status/health "mention") component, set up a way to destroy it, and trigger other logic with its **Message on Death**.

**After Object Interactions are Unlocked (some options)**

The following options use \[[**Event Count & Check**](#event-count-and-check)] logic, which can be duplicated and modified to track other events or reset to reuse.

* Count Object Interactions
* Wear Out Equipment
* [**Activate Equipment**](#activate-equipment) (recharge, refuel, repair, upgrade, etc. for repeat use/empty cycles)
  {% endtab %}

{% tab title="Example: Simple" %}

### **Potion Maker**

Welcome to the village as the new potion maker. Gather herbs and fruits to craft potions to help the townspeople. Equip different tools to interact with various plants, bushes, trees, and creatures. Work with a friend to gather resources and craft potions, supporting the town together.\
Note: When the player interacts with a berry bush, they will harvest the berries. The bush should swap assets or destroy itself to indicate it has been harvested. The bush can later regenerate over time.

**Unlocked Gameplay**

Once the berries are picked, the player can carry them to another location to process them into a potion, such as a cauldron. The player deposits the required amount of berries to create the potion.

<figure><img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2Ffq2Wg1RgKnuR4VWG7urX%2FUnique%20Interactions%20trim.gif?alt=media&#x26;token=c8d1a3e9-01e6-470c-a5f0-369161e6256d" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Example: Level Up Tools" %}

### **Clean Up the Streets**

Collect as much garbage as possible before the mayor arrives to judge the town.

**Unlocked Gameplay**\
Equip different tools, gloves, etc. to interact with various types of trash. Some items require special equipment, like a gas mask for smelly garbage.

**Level Up**\
Use coins earned from cleaning to buy tools that help you clean faster. This can be done with a small number of shop items using the [shop](https://docs.sandbox.game/en/creator/game-maker/creative-guides/game-rules-guide/shop "mention")preset.&#x20;

For a larger number of items in a shop, explore the [resource-management](https://docs.sandbox.game/en/creator/game-maker/creative-guides/experience-guide/resource-management "mention") template in Game Maker, paying close attention to how messages with arguments are used to buy and sell items using fewer rules.
{% endtab %}
{% endtabs %}

### Avoid Hazards

Wear equipment to prevent detection by enemies or a state where significant harm/death would occur.

**Use cases:** Avoid damage from environmental dangers (gas trap, radioactive area, deadly rainstorm, pass through fire, etc), sneak, wear a disguise, etc.

{% tabs %}
{% tab title="How it Works" %}
**Start:** The player sees or learns of a dangerous hazard or obstacle to overcome and gets visual clues to figure out what equipment is needed. Seeing health drained or being spotted by a low level monster players can survive against are natural ways to explain the situation.

**Gameplay Steps**

1. **Get Equipment:** Beginning equipment (collectable, not via Spawn Point), discover via hints/exploration, given by an NPC, or buy/trade/craft
2. **Hint:** Learn that the item prevents harm/death or detection and how to equip it.
3. **Equip:** Open Inventory and equip the asset
4. **Hint:** Learn that the player is now protected and can proceed safely.

**Outcome:** The player can safely overcome the hazard and continue their quest or adventure. This could lead to access to new areas to escape to a safe place.
{% endtab %}

{% tab title="Build It" %}

### Build It

{% hint style="info" %}
The dangers in this method can't be reversed and cause heavy damage quickly.
{% endhint %}

**Equipment**

* <img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2F1DuMFnUv13lWbbezqP9i%2Fimage.png?alt=media&#x26;token=adf11682-9ef9-4c07-93cb-df017f00ade8" alt="" data-size="line">[collectable](https://docs.sandbox.game/en/creator/game-maker/docs/components/actions/collectable "mention") component - <mark style="background-color:orange;">**On Equip**</mark> message (one item), <mark style="background-color:purple;">**Collect**</mark> message.
* **For multiple equipment:** Apply **\[**[**Event Count & Check**](#use-on-equip-message-s--event-count-and-check-setup)**]** logic to count events (equipping items) individually and check if an event total is met.
* **Hint:** Use ![](https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2Fe3VONdgy8QfCGAG04kRu%2Fimage.png?alt=media\&token=6e0d3ae4-5cad-4c4f-8b66-255d2b6ab630)[asker](https://docs.sandbox.game/en/creator/game-maker/docs/behaviours/basic-logic/asker "mention") or [#popup-window](https://docs.sandbox.game/en/creator/docs/game-rules/game-screen#popup-window "mention") to hint what the equipment does and how to put it on once the player has collected it (trigger with the <mark style="background-color:purple;">**Collect**</mark> message).

**Player Detection**

* Place a logic asset with <img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FIaOSCnmODVvwrVbCZ3HY%2FGM%20icon%20com%20trigger%20volume.png?alt=media&#x26;token=4b3659f2-40cf-4df3-a6d7-18f16d42c73b" alt="" data-size="line">[trigger-volume](https://docs.sandbox.game/en/creator/game-maker/docs/components/triggers/trigger-volume "mention") component. Set the detection area and <mark style="background-color:blue;">**Enter**</mark> message. Add a ![](https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FpvQ37hvZsM8OoxPTibkV%2Fimage.png?alt=media\&token=e5d1560b-bfb4-4e26-a79a-b2f2241ae0ee)[toggle](https://docs.sandbox.game/en/creator/game-maker/docs/components/status/toggle "mention") component that turns <mark style="color:red;">OFF</mark> with <mark style="background-color:orange;">**On Equip**</mark> as **Message to Destroy** (or `Events.Done` if using \[[**Event Count & Check**](#event-count-and-check)] logic).

**Hint of Danger**

* **Barrier or Checkpoint**
  * **Barrier:** Block access with an invisible asset and trigger a hint. Set collisions to change using <img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FsWIfpoYEqdyQbWT8SVOe%2Fimage.png?alt=media&#x26;token=f42e93a9-92de-4422-b31f-6b66f39559b0" alt="" data-size="line">[actor-property-switcher](https://docs.sandbox.game/en/creator/game-maker/docs/behaviours/modifiers/actor-property-switcher "mention") with <mark style="background-color:orange;">**On Equip**</mark> message (or `Events.Done` if using \[[**Event Count & Check**](#event-count-and-check)] logic).
  * **Checkpoint:** Detect the player, trigger a hint, and activate <img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FVyg38KiORuG1vkvYej9t%2FGM%20icon%20com%20checkpoint.png?alt=media&#x26;token=11f340ae-322d-4cee-8c89-f16882de480b" alt="" data-size="line">[avatar-checkpoint](https://docs.sandbox.game/en/creator/game-maker/docs/components/status/avatar-checkpoint "mention").
* **Hint:** ![](https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2Fe3VONdgy8QfCGAG04kRu%2Fimage.png?alt=media\&token=6e0d3ae4-5cad-4c4f-8b66-255d2b6ab630)[asker](https://docs.sandbox.game/en/creator/game-maker/docs/behaviours/basic-logic/asker "mention") or [#popup-window](https://docs.sandbox.game/en/creator/docs/game-rules/game-screen#popup-window "mention") hint for needed equipment and how to get it.

**Logic Outcome (some options)**

* **Enemy Detects Player**
  * **Per enemy:** Set a small detection area and place a copy of the detection logic asset at each enemy's location. Set as a child object of each enemy if the enemy moves.
  * **All enemies detect at once:** Set a large detection area on the detection logic asset's **Trigger Volume** to cover the whole space the player will be detected upon entering. If an unusual detection area is needed, duplicate the logic asset and position.
  * **Trigger Enemy to Attack:**

    For each enemy, apply![](https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2F8pfJ8AyJCjcqKB8pMliL%2Fimage.png?alt=media\&token=c1292d0a-1c0e-4420-b21b-9c48cc1ff28e)[replace-asset](https://docs.sandbox.game/en/creator/game-maker/docs/behaviours/modifiers/replace-asset "mention") behaviour triggered by the <mark style="background-color:blue;">**Enter**</mark> message. Set to replace with a preset of the same asset that has <img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FYWRr7C2obzOhJQA6QHdl%2Fimage.png?alt=media&#x26;token=a416b4f8-ff30-4196-a820-f851c532158a" alt="" data-size="line">[melee-enemy](https://docs.sandbox.game/en/creator/game-maker/docs/behaviours/npc-ai-pawns/melee-enemy "mention") behaviour. Either add many enemies or enemies with a very high amount of ![](https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FCL2QncHKRFIMjyA8fxKT%2Fimage.png?alt=media\&token=923fa309-5700-4f87-bb68-ae76de4fb5b9)[health](https://docs.sandbox.game/en/creator/game-maker/docs/components/status/health "mention") so the player must use equipment to survive.
* **Player Takes Continuous Damage When in an Area (requires \[**[**Event Count & Check**](#event-count-and-check)**] logic):**
  * **Check if Equipped:** \
    Create a logic asset with <img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2F3Xm5k7N86Ke5uylGJYeA%2Fimage.png?alt=media&#x26;token=f0f775a9-072f-4994-950b-f848b156bb9f" alt="" data-size="line">[message-broadcaster](https://docs.sandbox.game/en/creator/game-maker/docs/behaviours/basic-logic/message-broadcaster "mention") behaviour to send `Events.Check` to **Rules** forever with a **Delay Between Broadcasts** of 1 second. Set it to **Wait Before Broadcast** with the <mark style="background-color:blue;">**Enter**</mark> message required. Add a ![](https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FpvQ37hvZsM8OoxPTibkV%2Fimage.png?alt=media\&token=e5d1560b-bfb4-4e26-a79a-b2f2241ae0ee)[toggle](https://docs.sandbox.game/en/creator/game-maker/docs/components/status/toggle "mention") component that turns <mark style="color:red;">OFF</mark> with the message `Events.Done` and an **Initial Behaviour State** set as **True**. If the player enters the **Trigger Volume**, the broadcaster checks the Rules to see if required items have been equipped.
  * **Reduce Player Health if Not Equipped:** \
    Add a [#compare-numbers](https://docs.sandbox.game/en/creator/docs/game-rules/comparisons#compare-numbers "mention") rule triggered by the message `Events.Check`. Set it to compare the Event Counter variable to be less than the Event Goal. Set the **Message to Send** as <mark style="color:blue;">`Health`</mark> with a large negative argument value. If the player hasn't equipped the required items yet, this rule will reduce player health when triggered by the message broadcaster every 1 second.
    {% endtab %}

{% tab title="Example: Protective Gear" %}

### **Post-Apocalyptic Cleanup**

You are in a post-apocalyptic world with radiation leaks all around the area, and you have the unfortunate task of cleaning up the waste. Equip your suit and explore the world to clean up as much as you can before your suit runs out of protection and leaves you open to the dangers around you.&#x20;

**Unlocked Gameplay**\
Gather waste and other junk to sell and buy better-upgraded suits to last longer and take on more extreme versions of the wasteland world you find yourself in.
{% endtab %}

{% tab title="Example: Sneak" %}

### **Sneaking Around Giants**

You are lost in a world with giants that have taken a liking to eating humans. You need to find items to equip that will help you hide, blend in, and sneak around undetected.

**Unlocked Gameplay**\
Explore new areas while sneaking around to find an escape route.

<figure><img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FnMfdU2npKEGdfljnvZ6T%2FAvoid%20Environmental%20Hazards%20trim.gif?alt=media&#x26;token=1cb5c94c-077c-473c-a8f4-d773afab551c" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Example: Disguise" %}

### Zombie Disguise

You are trying to sneak past some zombies, but they can smell you from a mile away. You kill a zombie and take its clothes, which are covered in blood and rot.&#x20;

**Unlocked Gameplay**\
Once equipped, you can sneak around undetected.

**Twist**\
Set the equipment message to trigger a timer so the disguise has a limited effect.
{% endtab %}
{% endtabs %}

### Toggle Between States

Wear equipment to swap between two different states.

**Use cases:**  Change view, world state, gameplay state, etc. to access new puzzles, find clues, trigger new quests, access hidden areas, etc.

{% tabs %}
{% tab title="How it Works" %}
**Start:** The player has no way of progressing on a quest, in the game world, etc. and are hinted that they need specific equipment to switch between different states.

**Gameplay Steps**

1. **Get Equipment:** Discover via hints/exploration, given by an NPC, or buy/trade/craft
2. **Hint:** Learn that the equipment toggles between states and how to equip it
3. **Equip:** Open Inventory and equip the asset
4. **Hint:** A pop-up message or NPC explains which keys/mouse buttons trigger the different states (view, world, gameplay, etc.)

**Outcome:** The player can now explore previously inaccessible gameplay to complete new quests, hunt enemies, reveal clues/items, find new areas, open doors, trigger platforms, etc.
{% endtab %}

{% tab title="Build It" %}

### **Build It**

**Equipment**

* You must use **\[**[**Event Count & Check**](#use-on-equip-message-s--event-count-and-check-setup)**]** logic to count events (equipping one or more items) individually and check if an event total is met to trigger other logic.
* If your Experience must track multiple events, use **\[**[**Multi Event Count & Check**](#multi-event-count-and-check)**]**. Note that both rulesets use local (L) variables that track each player's event count uniquely, but in some cases one player may need multiple events tracked.
* **Hint:** Use ![](https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2Fe3VONdgy8QfCGAG04kRu%2Fimage.png?alt=media\&token=6e0d3ae4-5cad-4c4f-8b66-255d2b6ab630)[asker](https://docs.sandbox.game/en/creator/game-maker/docs/behaviours/basic-logic/asker "mention") or [#popup-window](https://docs.sandbox.game/en/creator/docs/game-rules/game-screen#popup-window "mention") to hint at what the equipment does, and how to put it on once collected it.

**Key Input**

* Add a [#key-input](https://docs.sandbox.game/en/creator/docs/game-rules/triggers#key-input "mention") or [#mouse-input](https://docs.sandbox.game/en/creator/docs/game-rules/triggers#mouse-input "mention") rule for each state you wish to trigger. Set each rule's message Out as the `Events.Check` message needed. Set up your outcome logic to receive the `Events.Done` message needed.

**Outcomes (some options)**

* **Change time/weather/world lighting:** ![](https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FFkFTYZQbLzgdM0OaTS5j%2Fimage.png?alt=media\&token=51841174-fa27-4242-8a33-df124b76b657)[weather-switcher](https://docs.sandbox.game/en/creator/game-maker/docs/behaviours/visual/weather-switcher "mention"), / ![](https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FiNmWpzJd3wMetGUKHM9W%2Ficon%20com%20vfx.png?alt=media\&token=07b8b01d-edbb-42dc-92b3-f12e88b15398)[visual-fx](https://docs.sandbox.game/en/creator/game-maker/docs/components/display/visual-fx "mention"), etc
* **Reveal secrets/change player view:** ![](https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2Fa5sQqXI6HIEN5sfk0POs%2Fimage.png?alt=media\&token=87bc1b4b-dad7-4b84-bd49-fd8756cb95e7)[post-process-effects](https://docs.sandbox.game/en/creator/game-maker/docs/behaviours/visual/post-process-effects "mention"), ![](https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FiNmWpzJd3wMetGUKHM9W%2Ficon%20com%20vfx.png?alt=media\&token=07b8b01d-edbb-42dc-92b3-f12e88b15398)[visual-fx](https://docs.sandbox.game/en/creator/game-maker/docs/components/display/visual-fx "mention"), <img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FkhWV85girzzxecmSWQ2L%2Fimage.png?alt=media&#x26;token=dd935948-d302-4b72-8901-de8a0aa12a3c" alt="" data-size="line">[light](https://docs.sandbox.game/en/creator/game-maker/docs/components/display/light "mention"), etc.
* **Spawn/kill assets:** <img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FrFFcp9Gy4XHBzf1svCMl%2Fimage.png?alt=media&#x26;token=c31bc0a1-8009-4fef-8e4c-cde4f1648a28" alt="" data-size="line">[asset-spawner](https://docs.sandbox.game/en/creator/game-maker/docs/behaviours/modifiers/asset-spawner "mention") (spawn presets), ![](https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FFKjep3zZ32i31PyRd8HR%2Ficon%20com%20old%20plant.png?alt=media\&token=2d54a2b5-a3d2-4644-a4a4-ae37d5b5bac9)[plant](https://docs.sandbox.game/en/creator/game-maker/docs/components/triggers/plant "mention") (to destroy), etc.
* **Change asset visibility/collisions (keeps logic):** ![](https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FsWIfpoYEqdyQbWT8SVOe%2Fimage.png?alt=media\&token=f42e93a9-92de-4422-b31f-6b66f39559b0)[actor-property-switcher](https://docs.sandbox.game/en/creator/game-maker/docs/behaviours/modifiers/actor-property-switcher "mention")
* **Toggle any behavior on/off:** ![](https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FpvQ37hvZsM8OoxPTibkV%2Fimage.png?alt=media\&token=e5d1560b-bfb4-4e26-a79a-b2f2241ae0ee)[toggle](https://docs.sandbox.game/en/creator/game-maker/docs/components/status/toggle "mention")
* **Stop a component's logic:** spawn/kill asset or use **Actor Property Switcher**
* **Switch between two logic states (sends a message per state):** <img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FA1RgLoh3TRchunv6JWXv%2Fimage.png?alt=media&#x26;token=f39998ba-f216-48f1-82e6-c0bc8583c556" alt="" data-size="line">[switch](https://docs.sandbox.game/en/creator/game-maker/docs/components/triggers/switch "mention")

**Switch Back**

Dynamic worlds where players have control can be extremely enjoyable, but require a bit more work to set up hidden gameplay to discover.

It's easiest to start with one state fully built, then modify to gradually set up switched logic and test, eventually resulting in multiple changes occurring at once and balanced gameplay. Take advantage of logic that creates a more powerful change such as wide area VFX, weather, etc.

While some switching logic setups may be very simple, in some advanced cases it could require a carefully planned and tested setup:

* to remove or deactivate logic and objects from state A while revealing or activating what belongs with state B
* to reverse all of the changes
* to introduce additional states
  {% endtab %}

{% tab title="Example: Reveal Secrets" %}

### **Ghost Hunter**

You are the latest ghost hunter investigating places no one else dares go. You carry around your ghost equipment and special goggles that allow you to see ghosts. Using your goggles, you enter scary buildings and look for clues of ghost activity. Switching between the normal and ghost view, you find and hunt down the ghosts, clearing the place of all ghost activity.

<figure><img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FL6jPn9toqz4Mjb4f922g%2FToggle%20Between%20States%20trim.gif?alt=media&#x26;token=d6f6c3f6-4721-4822-9ecc-be5153055b5d" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Example: Special Tools" %}

### **Spy Mission**

You are a spy sneaking into places in the darkest of nights. Using your night vision goggles, you can see better in the dark and highlight items of interest that you might need. Try to stay out of the light and use your night vision headset to sneak to success.
{% endtab %}

{% tab title="Example: Co-op Puzzle" %}

### **Co-op Temple Adventure**

You and a friend have discovered a hidden temple and found two strange headpieces. When equipped, you can toggle the temple to allow platforms and hidden doors to open. However, you are separated from your friend, and your headpiece affects the temple on their side. Together, you have to get your timings right to switch between the different states. You must help each other avoid traps, open doors, make enemies disappear, and make platforms appear, working together to navigate the temple.
{% endtab %}
{% endtabs %}

## PLAYERS

### Enhance Player with Equipment Attributes

Wear unique equipment that is designed to modify the player's base stats to increase performance.

**Use cases:&#x20;**<mark style="color:yellow;">**Power**</mark> to deal more attack damage, <mark style="color:red;">**Defense**</mark> to reduce damage when attacked, <mark style="color:blue;">**Speed**</mark> to increase movement rate, or any combination.

{% tabs %}
{% tab title="How it Works" %}
{% hint style="success" %}
**BUY OR CREATE EQUIPMENT**\
You can buy and test equipment NFTs from the Marketplace or create custom assets with VoxEdit for use in your own Experience without minting.
{% endhint %}

**Start:** The player discovers equipment which has certain [**Attributes**](https://docs.sandbox.game/en/creator/voxedit/mint-assets-sell-nfts#rarity-and-attributes). This may not be known until it is equipped.

**Gameplay Notes**

* Equipment with Attributes can be integrated into logic the same way as common assets.
* Be sure to emphasize the strengths of the equipment to the player.
* Gradually provide new equipment with stronger attributes to signify player growth.
* Consider how to balance gameplay so the game can be completed with default equipment or so the player will definitely be able to use stronger equipment if difficulty increases.
  {% endtab %}

{% tab title="Build It" %}

### **Build It**

**Start:** Decide what Attributes you want to increase for the player with the equipment, considering how it fits into your logic and narrative. This can also guide your art design.

**Asset Creation Steps:**

* [create-assets](https://docs.sandbox.game/en/creator/voxedit/create-assets "mention") with VoxEdit (see [#about-equipment-templates](https://docs.sandbox.game/en/creator/voxedit/docs/templates#about-equipment-templates "mention") to learn more).
* [upload-assets-to-workspaces](https://docs.sandbox.game/en/creator/voxedit/upload-assets-to-workspaces "mention") to make draft versions for testing the Attributes desired.\
  **Note:** You do **NOT** need to own **CATALYST** NFTs to complete this step.
* **Test in Game Maker:** Find your asset in the Library and test gameplay using it. If needed, try different Attributes by uploading the asset from VoxEdit again (new/replace draft).
* [**Publishing**](https://docs.sandbox.game/en/creator/game-maker/publish-experiences)**:** In [**Workspaces**](https://www.sandbox.game/en/me/communities/the-sandbox/workspace/)**,** set draft assets as **Ready** to finalize them for your Experience.

{% hint style="info" %}
Catalysts of higher rarity provide more Attribute Points that can boost players more.
{% endhint %}
{% endtab %}

{% tab title="Example: Damage Resistance" %}

### **The Lava River**

The lava deals damage to the player, when he swims in it. The base player has 100 life, so the player can die really quickly. By equipping gear with defence stats, the player increases his health. For each point of defence the player will get 1.6 points of health.

If a player equips items with a total of 125 defence, he increases his health to 308 points.

<figure><img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FluFtUm9qxaTMl2hgryya%2Fattributes%20lava%20river%20trim.gif?alt=media&#x26;token=d9ac9db3-c722-4b02-ab26-26bfb8397eb1" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Example: Movement Speed" %}

### **The Gap**

Sometimes a gap is to big for a player to jump over it with his base jump. Giving the player some speed items he can jump far enough to reach the other side.

In this case, the player got an item with 100, that boost his reach almost for 10%.

<figure><img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2F9ECDht4P6vEzZxAjQUj4%2FAttributes%20speed%20jump%20chasm%20trim.gif?alt=media&#x26;token=09e3e709-e467-4f97-ad41-8634f41a30eb" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Example: Attack Power" %}

### **Killing a NPC**

Fighting monsters and NPCs can be a big part in an experience. Player have various attacks to kill them. The base attack deals only 5 damage, so it can take a while to defeat an opponent. By equipping items with power, players deal more damage.

The base attack of the player is 5. If a player equips an item with 100 power, his normal attacks will deal 22 damage.

<figure><img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2Fc7kygd2MbvtQrv9ebgja%2FAttributes%20kill%20npc%20trim.gif?alt=media&#x26;token=d19b702a-b136-4db9-8193-9b504ee77a26" alt=""><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}

### Injure or Curse the Player

Wear equipment to dynamically cause a negative effect on the player, prompting real time reaction.&#x20;

**Risk & Reward:** helpful items have a negative effect, items have only positive or negative effect, etc.

**Use cases:** infection/poison, lost vision, hallucinations, confusion, intense hunger, blocked skill, etc.

{% hint style="success" %}
**CUES & COHESIVENESS**

Match the tone of your world well with the outcomes players may experience and provide visual cues (e.g., curse: glowing VFX, infection: rusty blade). This makes players feel safe to explore when risk is low or make choices strategically when risk is high.
{% endhint %}

{% tabs %}
{% tab title="How it Works" %}
**Start:** The player comes across equipment that they can collect, pick up, etc. without negative effect. However, there may be some indication that it could be dangerous to wear.\
If the player never equips the item, the negative effect remains a mystery.

**Gameplay Steps**

1. **Hint:** Visual cues (e.g., VFX) or NPC dialogue hint that equipment is harmful, but powerful. Equipment with no cues or benefit only suit difficult games with similarly beneficial items.\
   **Note:** If there's no way to remove the effect, communicate it clearly and make the equipment's benefit more powerful as a worthy trade-off.\
   **Examples:**\
   \- Drains health, but has a very high Power Attribute for attacks\
   \- Reduces vision, but heightens player senses to detect enemies sooner\
   \- Injures the player once, but allows them to heal teammates for a limited time
2. **Get Equipment:** Collect, buy, etc. if choosing to risk a negative effect
3. **Equip:** At any time, the player may open the Inventory and equip the item
4. **Alert:** The player notices a change via the HUD (health, poison, etc), spawned enemy, dialogue indicating the change, [post-process-effects](https://docs.sandbox.game/en/creator/game-maker/docs/behaviours/visual/post-process-effects "mention") (camera), etc.
5. **Hint (if it can be removed):**\
   **Note:** Unequipping can not send a message to trigger this)\
   **Examples:**\
   \- Kill spawned enemy\
   \- Find a potion\
   \- Equip a holy item\
   \- Wear a full set of cursed equipment to cancel it out

**Outcome:** The player may solve the issue and continue playing normally, or the effect may continue throughout the rest of the game. The game logic could also be designed so the player can re-equip the item (in this case, a timer should be used to cancel the effects).
{% endtab %}

{% tab title="Build It" %}

### Build It

**Equipment**

* <img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2F1DuMFnUv13lWbbezqP9i%2Fimage.png?alt=media&#x26;token=adf11682-9ef9-4c07-93cb-df017f00ade8" alt="" data-size="line">[collectable](https://docs.sandbox.game/en/creator/game-maker/docs/components/actions/collectable "mention") component - <mark style="background-color:orange;">**On Equip**</mark> message (one item), <mark style="background-color:purple;">**Collect**</mark> message.
* **For multiple equipment:** Apply **\[**[**Event Count & Check**](#use-on-equip-message-s--event-count-and-check-setup)**]** logic to count events (equipping items) individually and check if an event total is met.
* **Hint:** Use ![](https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2Fe3VONdgy8QfCGAG04kRu%2Fimage.png?alt=media\&token=6e0d3ae4-5cad-4c4f-8b66-255d2b6ab630)[asker](https://docs.sandbox.game/en/creator/game-maker/docs/behaviours/basic-logic/asker "mention") or [#popup-window](https://docs.sandbox.game/en/creator/docs/game-rules/game-screen#popup-window "mention") to hint what risks and benefits the equipment has and how to put it on once the player has collected it (trigger with the <mark style="background-color:purple;">**Collect**</mark> message).

**Logic Outcome (some options)**

**Note:** If you're using \[[**Event Count & Check**](#event-count-and-check)] logic for counting multiple equipment to trigger an outcome, use the message `Events.Done` instead of the <mark style="background-color:orange;">**On Equip**</mark> message in the logic below.&#x20;

* **Infection/Poison:** Use the <mark style="background-color:orange;">**On Equip**</mark> message to trigger the [poison](https://docs.sandbox.game/en/creator/game-maker/creative-guides/game-rules-guide/poison "mention") rules preset.
* **Hunger:** Use the <mark style="background-color:orange;">**On Equip**</mark> message to trigger the [hunger](https://docs.sandbox.game/en/creator/game-maker/creative-guides/game-rules-guide/hunger "mention") rules preset.
* **Lost Vision/Hallucinations:** Use the <mark style="background-color:orange;">**On Equip**</mark> message to trigger custom settings using [post-process-effects](https://docs.sandbox.game/en/creator/game-maker/docs/behaviours/visual/post-process-effects "mention") on the player camera.
* **Confusion** Use the <mark style="background-color:orange;">**On Equip**</mark> message to trigger various logic to indicate the player's perception of reality is inaccurate, such as ![](https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2Fa5sQqXI6HIEN5sfk0POs%2Fimage.png?alt=media\&token=87bc1b4b-dad7-4b84-bd49-fd8756cb95e7)[post-process-effects](https://docs.sandbox.game/en/creator/game-maker/docs/behaviours/visual/post-process-effects "mention"), ![](https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FiNmWpzJd3wMetGUKHM9W%2Ficon%20com%20vfx.png?alt=media\&token=07b8b01d-edbb-42dc-92b3-f12e88b15398)[visual-fx](https://docs.sandbox.game/en/creator/game-maker/docs/components/display/visual-fx "mention"), making previously stationary assets move with <img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2Ffzr94jr6eSIXR1B4eM2T%2FGM%20icon%20beh%20basic%20platform.png?alt=media&#x26;token=6e2fe0ec-f82c-414a-ac6e-867f935cbce5" alt="" data-size="line">[basic-platform](https://docs.sandbox.game/en/creator/game-maker/docs/behaviours/movement/basic-platform "mention") behaviour, etc.
* **Blocked Skill:** Use the <mark style="background-color:orange;">**On Equip**</mark> message to temporarily turn off an [**unlocked skill**](#unlock-player-class-skills) (don't forget to trigger the skill to work again after the effect is done).
* **Continuous Health Damage:**
  * Set up a <img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2F3Xm5k7N86Ke5uylGJYeA%2Fimage.png?alt=media&#x26;token=f0f775a9-072f-4994-950b-f848b156bb9f" alt="" data-size="line">[message-broadcaster](https://docs.sandbox.game/en/creator/game-maker/docs/behaviours/basic-logic/message-broadcaster "mention") that sends the message <mark style="color:blue;">`Health`</mark> with a negative argument value, a **Broadcast Duration** set to **Forever** and a **Delay Between Broadcasts** set to 1 second.&#x20;
  * Add a ![](https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FpvQ37hvZsM8OoxPTibkV%2Fimage.png?alt=media\&token=e5d1560b-bfb4-4e26-a79a-b2f2241ae0ee)[toggle](https://docs.sandbox.game/en/creator/game-maker/docs/components/status/toggle "mention")component with **Initial Behaviour State** toggle set to **False** with the <mark style="background-color:orange;">**On Equip**</mark> message to turn it <mark style="color:green;">ON</mark> and a message of your choice to turn it <mark style="color:red;">OFF</mark> (the solution).

**Polish**

* Create a [**progress bar**](https://docs.sandbox.game/en/creator/docs/game-rules/game-screen#hud) on the HUD to track poison, hunger, time to recovery, etc.
* Hint clearly at what the player may be able to do to reverse the effects and apply logic.

**Solutions**

{% hint style="warning" %}
Unequipping an item will not send a message to cancel out the effects of equipping.
{% endhint %}

* **Timed Effects**

  In Game Rules, create a time variable. Add a [#start-timer](https://docs.sandbox.game/en/creator/docs/game-rules/time#start-timer "mention") rule to count down from 60 seconds. Add a [#compare-numbers](https://docs.sandbox.game/en/creator/docs/game-rules/comparisons#compare-numbers "mention") (any amount needed) to check the timer variable against a fixed value, such as 50 seconds, and send a message Out. Add subtle visual cues like changed vision with ![](https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2Fa5sQqXI6HIEN5sfk0POs%2Fimage.png?alt=media\&token=87bc1b4b-dad7-4b84-bd49-fd8756cb95e7)[post-process-effects](https://docs.sandbox.game/en/creator/game-maker/docs/behaviours/visual/post-process-effects "mention") and ![](https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FiNmWpzJd3wMetGUKHM9W%2Ficon%20com%20vfx.png?alt=media\&token=07b8b01d-edbb-42dc-92b3-f12e88b15398)[visual-fx](https://docs.sandbox.game/en/creator/game-maker/docs/components/display/visual-fx "mention").

  * **Wait for time to pass:** Trigger effects to stop with the **Start Timer** rule's message **Out**.
  * **Resolve before time expires:** Set up logic to kill or injure the player with the **Start Timer** rule's message **Out** and set up logic for a solution (suggestions below) to communicate to **Rules** or **All** to stop the **Start Timer** rule. **Note:** Make sure it won't be possible for the player to trigger the rule again accidentally and start the timer.
* **Consume an item:** Create a potion, find a medical pack, etc.
* **Wear the Set:** Find and equip the remaining pieces of a cursed equipment set (tracked by \[[**Event Count & Check**](#event-count-and-check)] logic). Use the message `Events.Done` (sent when all are equipped) to trigger logic that ends any negative effects.
* **Eat:** Find and eat food to survive through extreme hunger for a short time
* **Reset Health:** Enter a healing area (e.g., shrine, healing pool, etc.) to cancel the effects
* **Balance:** Equip an item to cancel effects (e.g., holy pendant, item with opposite effect, etc.)
  {% endtab %}

{% tab title="Example: Poison" %}

### **Rusty Dagger**

The player finds a rusty dagger and decides to equip it. After a set time, the player realizes the dagger has cut them and caused poisoning. The player now needs to find a cure before they die. Nearby is a plant known to cure poison, and the player must stop whatever they are doing to get this item quickly.
{% endtab %}

{% tab title="Example: Blindness" %}

### **Powerful Helmet**

The player finds a powerful helmet that greatly increases defense but makes them nearly blind, darkening the game world.

Use ![](https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2Fa5sQqXI6HIEN5sfk0POs%2Fimage.png?alt=media\&token=87bc1b4b-dad7-4b84-bd49-fd8756cb95e7)[post-process-effects](https://docs.sandbox.game/en/creator/game-maker/docs/behaviours/visual/post-process-effects "mention") behaviour to modify the player camera and later restore player vision back to normal.
{% endtab %}

{% tab title="Example: Curse" %}

### **Cursed Crown**

The player finds a crown with a note warning that it is cursed. The player chooses to equip it, and the demon owner of the crown spawns to reclaim it. This could be used in a multiplayer experience to cause panic among players as the cursed demon roams around.

<figure><img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FjhfrSG5wLrohsgp1pebo%2FInjure%20or%20curse%20player%20trim.gif?alt=media&#x26;token=d12bd2a5-fb3a-4d8d-bf61-31d5dc676a06" alt=""><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}

### Trigger Power Ups

Wear equipment to trigger buffs and debuffs on the player once, infinitely, or when triggered by a key or mouse input.

**Use cases:**&#x20;

* **Health** or **Oxygen** meters: restore to maximum or reduce
* **Speed** (movement), **Attack Power**, or **Damage Resistance**: increase/decrease for a short time
* Set up logic to trigger buffs/debuffs on a timer for extended use needs

{% hint style="info" %}
See [power-up](https://docs.sandbox.game/en/creator/game-maker/docs/components/status/power-up "mention") documentation for detailed use cases. Anything can send Power Up special messages. Use a negative number in the message argument to set a debuff.
{% endhint %}

{% tabs %}
{% tab title="How it Works" %}
**Start:** The player may struggle to complete a task quickly enough or fully due to health hazards, not enough oxygen, not enough speed to finish in time or jump far enough, or enemies that have a large amount of health or very high attack power. They may even be hinted that equipping a certain item will activate a skill to use on command (with cooldown).

**Gameplay Steps**

1. **Get Equipment:** Discover via hints/exploration, given by an NPC, item drop from killing an enemy, or buy/trade/craft\
   Make the cost of the equipment higher to balance out longer term benefits (earn from a hard quest, spend more to buy/trade/craft it, kill a stronger enemy to drop it, etc)
2. **Hint:** Learn the benefit of equipping the item (which may be temporary or long term) and how to equip it, and use different Visual FX to signal how useful or valuable it is
3. **Equip:** Open Inventory and equip the asset
4. **Hint:** The effects of triggering Power Ups are built into Game Maker with updated health/oxygen meters or visual effects for speed, attack power, and damage resistance, but the player will benefit from a hint of what key to press and how long the cooldown period is if it has long term use with player input

**Outcome:** The player proceeds with the benefit of the Power Up, but speed, attack power, and damage resistance may have varied durations and triggers.
{% endtab %}

{% tab title="Build It" %}

### **Build It**

**Equipment**

* <img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2F1DuMFnUv13lWbbezqP9i%2Fimage.png?alt=media&#x26;token=adf11682-9ef9-4c07-93cb-df017f00ade8" alt="" data-size="line">[collectable](https://docs.sandbox.game/en/creator/game-maker/docs/components/actions/collectable "mention") component - <mark style="background-color:orange;">**On Equip**</mark> message (one item), <mark style="background-color:purple;">**Collect**</mark> message.
* **For multiple equipment or repeat trigger:** Apply **\[**[**Event Count & Check**](#use-on-equip-message-s--event-count-and-check-setup)**]** logic to count events (equipping items) individually and check if an event total is met.
* **Hint:** Use ![](https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2Fe3VONdgy8QfCGAG04kRu%2Fimage.png?alt=media\&token=6e0d3ae4-5cad-4c4f-8b66-255d2b6ab630)[asker](https://docs.sandbox.game/en/creator/game-maker/docs/behaviours/basic-logic/asker "mention") or [#popup-window](https://docs.sandbox.game/en/creator/docs/game-rules/game-screen#popup-window "mention") to hint at what buff the equipment offers, how long it lasts, and how to put it on once collected it (trigger with the <mark style="background-color:purple;">**Collect**</mark> message).

**Trigger Buffs**

<mark style="background-color:blue;">**Power Up**</mark>**&#x20;options:&#x20;**<mark style="color:blue;">**`Health`**</mark>, <mark style="color:blue;">**`Oxygen`**</mark>, <mark style="color:blue;">**`Speed`**</mark>, <mark style="color:blue;">**`Attack Power`**</mark>, or <mark style="color:blue;">**`Damage Resistance`**</mark>

* **Trigger Once (simple):**\
  In the rule system, add a [#send-message](https://docs.sandbox.game/en/creator/docs/game-rules/events#send-message "mention") rule. Set <mark style="background-color:orange;">**On Equip**</mark> as the **Required Message** (or `Events.Done` if using \[[**Event Count & Check**](#event-count-and-check)] logic). Send a <mark style="background-color:blue;">Power Up</mark> message **Out**. Set the message argument to customise the effect (use a negative number to apply a debuff).
* **Trigger Like a Skill**
  * [**Repeatedly**](#trigger-repeatedly)
  * [**Infinitely**](#trigger-infinitely)
  * [**Key/Mouse Input (with cooldown)**](#trigger-with-key-mouse-input-with-cooldown)

{% hint style="success" %}
Once a Power Up is activated, it can NOT be undone by unequipping the item. Consider evolving the player's skill over time with Power Ups.\
**Examples:**

* Provide equipment (same slot) over time to gradually trigger stronger Power Ups.
* Require to drop equipment where its tag will be detected to cancel its effects or replace it with a different skill (same or different equipment slot).
  {% endhint %}
  {% endtab %}

{% tab title="Trigger Repeat" %}

### Trigger Repeatedly

**Trigger a Power Up repeatedly for a set time.**\
**Note:** This method prevents conflicts if your Experience uses a Power Up multiple ways.

* You must use **\[**[**Event Count & Check**](#use-on-equip-message-s--event-count-and-check-setup)**]** logic to count events (equipping one or more items) individually and check if an event total is met to trigger other logic.
* Copy and paste the ruleset below into your Game Rules gridboard and customise:
* Modify the **Start Timer** rule for the total buff/debuff duration you want.
* Modify the other **Start Timer** rule for the buff/debuff loop time.
* Modify the **Send Message** rule's message Out to desired <mark style="background-color:blue;">**Power Up**</mark>**,** custom argument.

```json
{
  "GameplayData": {
    "Version": 20,
    "SaveData": "{\"RulesetDatas\":[{\"TreeDatas\":[{\"DisplayName\":\"Start timer - Total Buff/Debuff Period\",\"PresetId\":\"StartTimerTree\",\"Id\":\"7e79c9fe-2586-40ef-b117-247d952ace37\",\"EnableDebugging\":false,\"TreeFieldData\":{\"TriggerMessage\":\"Events.Done\",\"Timer\":\"{\\\"BlackboardType\\\":1,\\\"Id\\\":\\\"d5ad8c31-b53e-4477-84d8-518d834a2f86\\\"}\",\"ValueSource\":\"{\\\"ValueSource\\\":2,\\\"SubSaveData\\\":{\\\"Constant\\\":\\\"60.0\\\",\\\"BlackboardValue\\\":\\\"{\\\\\\\"BlackboardType\\\\\\\":0,\\\\\\\"Id\\\\\\\":\\\\\\\"\\\\\\\"}\\\",\\\"MessageArgument\\\":\\\"{\\\\\\\"MessageId\\\\\\\":\\\\\\\"Events.Done\\\\\\\",\\\\\\\"Field\\\\\\\":null}\\\"}}\",\"StopTriggerMessage\":null,\"OutgoingMessage\":\"{\\\"MessageId\\\":\\\"Stop.Loop\\\",\\\"ArgumentsData\\\":[]}\"}},{\"DisplayName\":\"Start timer - Buff/Debuff Loop Trigger\",\"PresetId\":\"StartTimerTree\",\"Id\":\"b55a4b03-d91e-4513-9299-bb2aeac1a5ba\",\"EnableDebugging\":false,\"TreeFieldData\":{\"TriggerMessage\":\"Trigger.PowerUp\",\"Timer\":\"{\\\"BlackboardType\\\":1,\\\"Id\\\":\\\"da2ff520-04c8-420f-ab43-8416a4758059\\\"}\",\"ValueSource\":\"{\\\"ValueSource\\\":2,\\\"SubSaveData\\\":{\\\"Constant\\\":\\\"10.0\\\",\\\"BlackboardValue\\\":\\\"{\\\\\\\"BlackboardType\\\\\\\":0,\\\\\\\"Id\\\\\\\":\\\\\\\"\\\\\\\"}\\\",\\\"MessageArgument\\\":\\\"{\\\\\\\"MessageId\\\\\\\":\\\\\\\"Trigger.PowerUp\\\\\\\",\\\\\\\"Field\\\\\\\":null}\\\"}}\",\"StopTriggerMessage\":\"Stop.Loop\",\"OutgoingMessage\":\"{\\\"MessageId\\\":\\\"Trigger.PowerUp\\\",\\\"ArgumentsData\\\":[]}\"}},{\"DisplayName\":\"Send Message - Trigger a Buff/Debuff\",\"PresetId\":\"MessageOnMessageTree\",\"Id\":\"ee785edc-77ed-4804-8633-06632970b723\",\"EnableDebugging\":false,\"TreeFieldData\":{\"TriggerMessage\":\"Trigger.PowerUp\",\"OutgoingMessage\":\"{\\\"MessageId\\\":\\\"Health\\\",\\\"ArgumentsData\\\":[\\\"{\\\\\\\"ValueSource\\\\\\\":2,\\\\\\\"SubSaveData\\\\\\\":{\\\\\\\"Constant\\\\\\\":\\\\\\\"10\\\\\\\",\\\\\\\"BlackboardValue\\\\\\\":\\\\\\\"{\\\\\\\\\\\\\\\"BlackboardType\\\\\\\\\\\\\\\":0,\\\\\\\\\\\\\\\"Id\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"}\\\\\\\",\\\\\\\"MessageArgument\\\\\\\":\\\\\\\"{\\\\\\\\\\\\\\\"MessageId\\\\\\\\\\\\\\\":null,\\\\\\\\\\\\\\\"Field\\\\\\\\\\\\\\\":null}\\\\\\\"}}\\\"]}\"}},{\"DisplayName\":\"Send Message - Trigger First Buff/Debuff\",\"PresetId\":\"MessageOnMessageTree\",\"Id\":\"f7541cd7-193e-4d11-977f-d625e758eeb2\",\"EnableDebugging\":false,\"TreeFieldData\":{\"TriggerMessage\":\"Events.Done\",\"OutgoingMessage\":\"{\\\"MessageId\\\":\\\"Trigger.PowerUp\\\",\\\"ArgumentsData\\\":[]}\"}}],\"DisplayName\":\"Trigger a Power Up (Buff/Debuff) On Loop for a Duration\",\"Description\":null,\"EnableDebugging\":false,\"Id\":\"c7073795-2a8e-4938-8d91-c50317e1ce8b\"}],\"version\":-1,\"dataID\":null}"
  },
  "Type": 0,
  "Messages": {
    "Version": 1,
    "SaveData": "[{\"Enabled\":true,\"SystemMessage\":false,\"Message\":\"Events.Done\",\"Color\":\"FFFFFFFF\",\"IsPermanent\":false,\"Parameters\":[],\"Tags\":[\"Default\"],\"HasColor\":false},{\"Enabled\":true,\"SystemMessage\":false,\"Message\":\"Stop.Loop\",\"Color\":\"FFFFFFFF\",\"IsPermanent\":false,\"Parameters\":[],\"Tags\":[\"Default\"],\"HasColor\":false},{\"Enabled\":true,\"SystemMessage\":false,\"Message\":\"Trigger.PowerUp\",\"Color\":\"FFFFFFFF\",\"IsPermanent\":false,\"Parameters\":[],\"Tags\":[\"Default\"],\"HasColor\":false},{\"Enabled\":true,\"SystemMessage\":false,\"Message\":\"Stop.Loop\",\"Color\":\"FFFFFFFF\",\"IsPermanent\":false,\"Parameters\":[],\"Tags\":[\"Default\"],\"HasColor\":false},{\"Enabled\":true,\"SystemMessage\":false,\"Message\":\"Trigger.PowerUp\",\"Color\":\"FFFFFFFF\",\"IsPermanent\":false,\"Parameters\":[],\"Tags\":[\"Default\"],\"HasColor\":false},{\"Enabled\":true,\"SystemMessage\":false,\"Message\":\"Trigger.PowerUp\",\"Color\":\"FFFFFFFF\",\"IsPermanent\":false,\"Parameters\":[],\"Tags\":[\"Default\"],\"HasColor\":false},{\"Enabled\":true,\"SystemMessage\":false,\"Message\":\"Health\",\"Color\":\"5EA1D7FF\",\"IsPermanent\":true,\"Parameters\":[{\"Type\":\"Int\",\"DefaultValue\":10,\"DisplayName\":\"<i>Health</i>\",\"UIConfigParameters\":[\"Range (-1000,1000)\"]}],\"Tags\":[\"PowerUp\",\"Default\"],\"HasColor\":true},{\"Enabled\":true,\"SystemMessage\":false,\"Message\":\"Events.Done\",\"Color\":\"FFFFFFFF\",\"IsPermanent\":false,\"Parameters\":[],\"Tags\":[\"Default\"],\"HasColor\":false},{\"Enabled\":true,\"SystemMessage\":false,\"Message\":\"Trigger.PowerUp\",\"Color\":\"FFFFFFFF\",\"IsPermanent\":false,\"Parameters\":[],\"Tags\":[\"Default\"],\"HasColor\":false}]"
  },
  "Fields": {
    "Version": 8,
    "SaveData": "{\"Fields\":[{\"$type\":\"Sandbox.Engine.RuleTrees.Timer.RtTimerBlackboardFieldData, Sandbox.Engine\",\"ConcreteDefaultValue\":{\"Timer\":0.0,\"TimerState\":0,\"TimerType\":0},\"Id\":\"d5ad8c31-b53e-4477-84d8-518d834a2f86\",\"BlackboardType\":1,\"IsSelectable\":true,\"FriendlyName\":\"PowerUp Total Time\",\"Mode\":1,\"ValueFormatId\":0},{\"$type\":\"Sandbox.Engine.RuleTrees.Timer.RtTimerBlackboardFieldData, Sandbox.Engine\",\"ConcreteDefaultValue\":{\"Timer\":0.0,\"TimerState\":0,\"TimerType\":0},\"Id\":\"da2ff520-04c8-420f-ab43-8416a4758059\",\"BlackboardType\":1,\"IsSelectable\":true,\"FriendlyName\":\"PowerUp Loop Time\",\"Mode\":1,\"ValueFormatId\":0}],\"version\":-1,\"dataID\":null}"
  }
}
```

{% endtab %}

{% tab title="Trigger Infinite" %}

### Trigger Infinitely

**Trigger a Power Up infinitely once triggered, which can be interrupted via a loop timer rule.**

**Simple**\
**Note:** This may conflict with other logic in your Experience using the same Power Up.

* Set up logic for a one time trigger. Create a time variable. Add a [#start-timer](https://docs.sandbox.game/en/creator/docs/game-rules/time#start-timer "mention") rule to a desired loop time. Set the <mark style="background-color:blue;">Power Up</mark> message you chose as the **Required Message** and send the <mark style="background-color:orange;">**On Equip**</mark> message **Out** (or `Events.Done` if using \[[**Event Count & Check**](#event-count-and-check)] logic) to trigger a loop.

**Use the Power Up type multiple ways in the Experience**\
**Note:** This method prevents conflicts if your Experience uses a Power Up multiple ways.

* You must use **\[**[**Event Count & Check**](#use-on-equip-message-s--event-count-and-check-setup)**]** logic to count events (equipping one or more items) individually and check if an event total is met to trigger other logic.
* Copy and paste the ruleset below into your Game Rules gridboard and customise:
* Modify the **Start Timer** rule for loop time between triggering another buff/debuff.
* Modify the **Send Message** rule (Trigger a Buff/Debuff) message **Out** to desired <mark style="background-color:blue;">**Power Up**</mark>**,** custom argument.

```
{
  "GameplayData": {
    "Version": 20,
    "SaveData": "{\"RulesetDatas\":[{\"TreeDatas\":[{\"DisplayName\":\"Start timer - Buff/Debuff Loop Trigger\",\"PresetId\":\"StartTimerTree\",\"Id\":\"b55a4b03-d91e-4513-9299-bb2aeac1a5ba\",\"EnableDebugging\":false,\"TreeFieldData\":{\"TriggerMessage\":\"Trigger.PowerUp\",\"Timer\":\"{\\\"BlackboardType\\\":1,\\\"Id\\\":\\\"da2ff520-04c8-420f-ab43-8416a4758059\\\"}\",\"ValueSource\":\"{\\\"ValueSource\\\":2,\\\"SubSaveData\\\":{\\\"Constant\\\":\\\"15.0\\\",\\\"BlackboardValue\\\":\\\"{\\\\\\\"BlackboardType\\\\\\\":0,\\\\\\\"Id\\\\\\\":\\\\\\\"\\\\\\\"}\\\",\\\"MessageArgument\\\":\\\"{\\\\\\\"MessageId\\\\\\\":\\\\\\\"Trigger.PowerUp\\\\\\\",\\\\\\\"Field\\\\\\\":null}\\\"}}\",\"StopTriggerMessage\":\"Stop.PowerUp\",\"OutgoingMessage\":\"{\\\"MessageId\\\":\\\"Trigger.PowerUp\\\",\\\"ArgumentsData\\\":[]}\"}},{\"DisplayName\":\"Send Message - Trigger a Buff/Debuff\",\"PresetId\":\"MessageOnMessageTree\",\"Id\":\"ee785edc-77ed-4804-8633-06632970b723\",\"EnableDebugging\":false,\"TreeFieldData\":{\"TriggerMessage\":\"Trigger.PowerUp\",\"OutgoingMessage\":\"{\\\"MessageId\\\":\\\"Health\\\",\\\"ArgumentsData\\\":[\\\"{\\\\\\\"ValueSource\\\\\\\":2,\\\\\\\"SubSaveData\\\\\\\":{\\\\\\\"Constant\\\\\\\":\\\\\\\"-10\\\\\\\",\\\\\\\"BlackboardValue\\\\\\\":\\\\\\\"{\\\\\\\\\\\\\\\"BlackboardType\\\\\\\\\\\\\\\":0,\\\\\\\\\\\\\\\"Id\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"}\\\\\\\",\\\\\\\"MessageArgument\\\\\\\":\\\\\\\"{\\\\\\\\\\\\\\\"MessageId\\\\\\\\\\\\\\\":null,\\\\\\\\\\\\\\\"Field\\\\\\\\\\\\\\\":null}\\\\\\\"}}\\\"]}\"}},{\"DisplayName\":\"Send Message - Trigger First Buff/Debuff\",\"PresetId\":\"MessageOnMessageTree\",\"Id\":\"f7541cd7-193e-4d11-977f-d625e758eeb2\",\"EnableDebugging\":false,\"TreeFieldData\":{\"TriggerMessage\":\"Events.Done\",\"OutgoingMessage\":\"{\\\"MessageId\\\":\\\"Trigger.PowerUp\\\",\\\"ArgumentsData\\\":[]}\"}}],\"DisplayName\":\"Trigger a Power Up (Buff/Debuff) On Loop for a Duration\",\"Description\":null,\"EnableDebugging\":false,\"Id\":\"c7073795-2a8e-4938-8d91-c50317e1ce8b\"}],\"version\":-1,\"dataID\":null}"
  },
  "Type": 0,
  "Messages": {
    "Version": 1,
    "SaveData": "[{\"Enabled\":true,\"SystemMessage\":false,\"Message\":\"Trigger.PowerUp\",\"Color\":\"FFFFFFFF\",\"IsPermanent\":false,\"Parameters\":[],\"Tags\":[\"Default\"],\"HasColor\":false},{\"Enabled\":true,\"SystemMessage\":false,\"Message\":\"Stop.PowerUp\",\"Color\":\"FFFFFFFF\",\"IsPermanent\":false,\"Parameters\":[],\"Tags\":[\"Default\"],\"HasColor\":false},{\"Enabled\":true,\"SystemMessage\":false,\"Message\":\"Trigger.PowerUp\",\"Color\":\"FFFFFFFF\",\"IsPermanent\":false,\"Parameters\":[],\"Tags\":[\"Default\"],\"HasColor\":false},{\"Enabled\":true,\"SystemMessage\":false,\"Message\":\"Trigger.PowerUp\",\"Color\":\"FFFFFFFF\",\"IsPermanent\":false,\"Parameters\":[],\"Tags\":[\"Default\"],\"HasColor\":false},{\"Enabled\":true,\"SystemMessage\":false,\"Message\":\"Health\",\"Color\":\"5EA1D7FF\",\"IsPermanent\":true,\"Parameters\":[{\"Type\":\"Int\",\"DefaultValue\":10,\"DisplayName\":\"<i>Health</i>\",\"UIConfigParameters\":[\"Range (-1000,1000)\"]}],\"Tags\":[\"PowerUp\",\"Default\"],\"HasColor\":true},{\"Enabled\":true,\"SystemMessage\":false,\"Message\":\"Events.Done\",\"Color\":\"FFFFFFFF\",\"IsPermanent\":false,\"Parameters\":[],\"Tags\":[\"Default\"],\"HasColor\":false},{\"Enabled\":true,\"SystemMessage\":false,\"Message\":\"Trigger.PowerUp\",\"Color\":\"FFFFFFFF\",\"IsPermanent\":false,\"Parameters\":[],\"Tags\":[\"Default\"],\"HasColor\":false}]"
  },
  "Fields": {
    "Version": 8,
    "SaveData": "{\"Fields\":[{\"$type\":\"Sandbox.Engine.RuleTrees.Timer.RtTimerBlackboardFieldData, Sandbox.Engine\",\"ConcreteDefaultValue\":{\"Timer\":0.0,\"TimerState\":0,\"TimerType\":0},\"Id\":\"da2ff520-04c8-420f-ab43-8416a4758059\",\"BlackboardType\":1,\"IsSelectable\":true,\"FriendlyName\":\"PowerUp Loop Time\",\"Mode\":1,\"ValueFormatId\":0}],\"version\":-1,\"dataID\":null}"
  }
}
```

{% endtab %}

{% tab title="Trigger Input" %}

### Trigger with Key/Mouse Input (with cooldown)

**Trigger a Power Up with a Key/Mouse Input and display a cooldown bar on the HUD.**

* You must use **\[**[**Event Count & Check**](#use-on-equip-message-s--event-count-and-check-setup)**]** logic to count events (equipping one or more items) individually and check if an event total is met to trigger other logic.
* Copy and paste the ruleset below into your Game Rules gridboard and customise:
  * Modify the **Key Input** rule to use a key of your choice or replace with a **Mouse Input**.
  * Modify the **Buff/Debuff Cooldown Timer** rule's duration.
  * Modify the **Send Message** rule's message **Out** to desired <mark style="background-color:blue;">**Power Up**</mark>**,** custom argument.
* **Cancel/Restore this logic during gameplay:**
  * **Cancel:** Add a **Math** rule to subtract 1 from the Event Counter variable used in the \[[**Event Count & Check**](#event-count-and-check)] setup (trigger with any message).
  * **Restore:** Send `Event.Triggered` to **Rules** or **All** to increase the Event Counter again.

```json
{
  "GameplayData": {
    "Version": 20,
    "SaveData": "{\"RulesetDatas\":[{\"TreeDatas\":[{\"DisplayName\":\"Key input - Test if Events are Done\",\"PresetId\":\"KeyboardInputTree\",\"Id\":\"74563933-c4d4-44fe-a863-db0859d07166\",\"EnableDebugging\":false,\"TreeFieldData\":{\"Input\":\"0\",\"PressedMessage\":\"{\\\"MessageId\\\":\\\"Events.Check\\\",\\\"ArgumentsData\\\":[]}\",\"ReleasedMessage\":\"{\\\"MessageId\\\":\\\"\\\",\\\"ArgumentsData\\\":[]}\"}},{\"DisplayName\":\"Send Message - Check if Cooldown is Done\",\"PresetId\":\"MessageOnMessageTree\",\"Id\":\"f7541cd7-193e-4d11-977f-d625e758eeb2\",\"EnableDebugging\":false,\"TreeFieldData\":{\"TriggerMessage\":\"Events.Done\",\"OutgoingMessage\":\"{\\\"MessageId\\\":\\\"Cooldown.Check\\\",\\\"ArgumentsData\\\":[]}\"}},{\"DisplayName\":\"Compare numbers - Start Cooldown & Trigger Buff\",\"PresetId\":\"MessageOnAmountTree\",\"Id\":\"bc79f661-add9-4e3b-a084-cc2607b81e75\",\"EnableDebugging\":false,\"TreeFieldData\":{\"TriggerMessage\":\"Cooldown.Check\",\"Score\":\"{\\\"BlackboardType\\\":1,\\\"Id\\\":\\\"da2ff520-04c8-420f-ab43-8416a4758059\\\"}\",\"Equation\":\"0\",\"ValueSource\":\"{\\\"ValueSource\\\":2,\\\"SubSaveData\\\":{\\\"Constant\\\":\\\"0.0\\\",\\\"BlackboardValue\\\":\\\"{\\\\\\\"BlackboardType\\\\\\\":0,\\\\\\\"Id\\\\\\\":\\\\\\\"\\\\\\\"}\\\",\\\"MessageArgument\\\":\\\"{\\\\\\\"MessageId\\\\\\\":\\\\\\\"Cooldown.Check\\\\\\\",\\\\\\\"Field\\\\\\\":null}\\\"}}\",\"CreateConditionalEvent\":\"False\",\"OutgoingMessage\":\"{\\\"MessageId\\\":\\\"Cooldown.Done\\\",\\\"ArgumentsData\\\":[]}\"}},{\"DisplayName\":\"Start timer - Buff/Debuff Cooldown Timer\",\"PresetId\":\"StartTimerTree\",\"Id\":\"b55a4b03-d91e-4513-9299-bb2aeac1a5ba\",\"EnableDebugging\":false,\"TreeFieldData\":{\"TriggerMessage\":\"Cooldown.Done\",\"Timer\":\"{\\\"BlackboardType\\\":1,\\\"Id\\\":\\\"da2ff520-04c8-420f-ab43-8416a4758059\\\"}\",\"ValueSource\":\"{\\\"ValueSource\\\":2,\\\"SubSaveData\\\":{\\\"Constant\\\":\\\"20.0\\\",\\\"BlackboardValue\\\":\\\"{\\\\\\\"BlackboardType\\\\\\\":0,\\\\\\\"Id\\\\\\\":\\\\\\\"\\\\\\\"}\\\",\\\"MessageArgument\\\":\\\"{\\\\\\\"MessageId\\\\\\\":\\\\\\\"Cooldown.Done\\\\\\\",\\\\\\\"Field\\\\\\\":null}\\\"}}\",\"StopTriggerMessage\":null,\"OutgoingMessage\":\"{\\\"MessageId\\\":\\\"\\\",\\\"ArgumentsData\\\":[]}\"}},{\"DisplayName\":\"Send Message - Trigger a Buff/Debuff\",\"PresetId\":\"MessageOnMessageTree\",\"Id\":\"ee785edc-77ed-4804-8633-06632970b723\",\"EnableDebugging\":false,\"TreeFieldData\":{\"TriggerMessage\":\"Cooldown.Done\",\"OutgoingMessage\":\"{\\\"MessageId\\\":\\\"Health\\\",\\\"ArgumentsData\\\":[\\\"{\\\\\\\"ValueSource\\\\\\\":2,\\\\\\\"SubSaveData\\\\\\\":{\\\\\\\"Constant\\\\\\\":\\\\\\\"10\\\\\\\",\\\\\\\"BlackboardValue\\\\\\\":\\\\\\\"{\\\\\\\\\\\\\\\"BlackboardType\\\\\\\\\\\\\\\":0,\\\\\\\\\\\\\\\"Id\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"}\\\\\\\",\\\\\\\"MessageArgument\\\\\\\":\\\\\\\"{\\\\\\\\\\\\\\\"MessageId\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"Cooldown.Done\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Field\\\\\\\\\\\\\\\":null}\\\\\\\"}}\\\"]}\"}},{\"DisplayName\":\"HUD - Display Cooldown Progress Bar\",\"PresetId\":\"HudStyleChangeTree\",\"Id\":\"f2038d5c-409c-4baf-986d-97ba7a66e2f5\",\"EnableDebugging\":false,\"TreeFieldData\":{\"TriggerMessage\":\"Cooldown.Done\",\"HudStyleChange\":\"{\\\"SlotSettings\\\":{\\\"int2(1, 0)\\\":\\\"{\\\\\\\"BlackboardValue\\\\\\\":\\\\\\\"{\\\\\\\\\\\\\\\"BlackboardType\\\\\\\\\\\\\\\":1,\\\\\\\\\\\\\\\"Id\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"da2ff520-04c8-420f-ab43-8416a4758059\\\\\\\\\\\\\\\"}\\\\\\\",\\\\\\\"DisplayName\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"Cooldown\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"IconPath\\\\\\\":\\\\\\\"Icons/RulesVariables/Clock.png\\\\\\\",\\\\\\\"Size\\\\\\\":\\\\\\\"0\\\\\\\",\\\\\\\"ValueMode\\\\\\\":\\\\\\\"0\\\\\\\",\\\\\\\"ShowProgressBar\\\\\\\":\\\\\\\"True\\\\\\\",\\\\\\\"ShowValue\\\\\\\":\\\\\\\"False\\\\\\\",\\\\\\\"TimerFormat\\\\\\\":\\\\\\\"0\\\\\\\",\\\\\\\"FloatFormat\\\\\\\":\\\\\\\"0\\\\\\\",\\\\\\\"BoolFormat\\\\\\\":\\\\\\\"0\\\\\\\",\\\\\\\"MinValueValueSource\\\\\\\":\\\\\\\"{\\\\\\\\\\\\\\\"ValueSource\\\\\\\\\\\\\\\":2,\\\\\\\\\\\\\\\"SubSaveData\\\\\\\\\\\\\\\":{\\\\\\\\\\\\\\\"Constant\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"0.0\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"BlackboardValue\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"{\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"BlackboardType\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\":0,\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"Id\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"}\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"MessageArgument\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"{\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"MessageId\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\":null,\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"Field\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\":null}\\\\\\\\\\\\\\\"}}\\\\\\\",\\\\\\\"MaxValueValueSource\\\\\\\":\\\\\\\"{\\\\\\\\\\\\\\\"ValueSource\\\\\\\\\\\\\\\":2,\\\\\\\\\\\\\\\"SubSaveData\\\\\\\\\\\\\\\":{\\\\\\\\\\\\\\\"Constant\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"60.0\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"BlackboardValue\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"{\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"BlackboardType\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\":0,\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"Id\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"}\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"MessageArgument\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"{\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"MessageId\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\":null,\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"Field\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\":null}\\\\\\\\\\\\\\\"}}\\\\\\\"}\\\"}}\"}}],\"DisplayName\":\"Power Up with Key/Mouse Input (with cooldown) - Triggered if events are done and cooldown expires\",\"Description\":null,\"EnableDebugging\":false,\"Id\":\"2582d073-c00d-4143-acce-1956bd4e4883\"}],\"version\":-1,\"dataID\":null}"
  },
  "Type": 0,
  "Messages": {
    "Version": 1,
    "SaveData": "[{\"Enabled\":true,\"SystemMessage\":false,\"Message\":\"Events.Check\",\"Color\":\"FFFFFFFF\",\"IsPermanent\":false,\"Parameters\":[],\"Tags\":[\"Default\"],\"HasColor\":false},{\"Enabled\":true,\"SystemMessage\":false,\"Message\":\"Events.Done\",\"Color\":\"FFFFFFFF\",\"IsPermanent\":false,\"Parameters\":[],\"Tags\":[\"Default\"],\"HasColor\":false},{\"Enabled\":true,\"SystemMessage\":false,\"Message\":\"Cooldown.Check\",\"Color\":\"FFFFFFFF\",\"IsPermanent\":false,\"Parameters\":[],\"Tags\":[\"Default\"],\"HasColor\":false},{\"Enabled\":true,\"SystemMessage\":false,\"Message\":\"Cooldown.Check\",\"Color\":\"FFFFFFFF\",\"IsPermanent\":false,\"Parameters\":[],\"Tags\":[\"Default\"],\"HasColor\":false},{\"Enabled\":true,\"SystemMessage\":false,\"Message\":\"Cooldown.Done\",\"Color\":\"FFFFFFFF\",\"IsPermanent\":false,\"Parameters\":[],\"Tags\":[\"Default\"],\"HasColor\":false},{\"Enabled\":true,\"SystemMessage\":false,\"Message\":\"Cooldown.Done\",\"Color\":\"FFFFFFFF\",\"IsPermanent\":false,\"Parameters\":[],\"Tags\":[\"Default\"],\"HasColor\":false},{\"Enabled\":true,\"SystemMessage\":false,\"Message\":\"Cooldown.Done\",\"Color\":\"FFFFFFFF\",\"IsPermanent\":false,\"Parameters\":[],\"Tags\":[\"Default\"],\"HasColor\":false},{\"Enabled\":true,\"SystemMessage\":false,\"Message\":\"Health\",\"Color\":\"5EA1D7FF\",\"IsPermanent\":true,\"Parameters\":[{\"Type\":\"Int\",\"DefaultValue\":10,\"DisplayName\":\"<i>Health</i>\",\"UIConfigParameters\":[\"Range (-1000,1000)\"]}],\"Tags\":[\"PowerUp\",\"Default\"],\"HasColor\":true},{\"Enabled\":true,\"SystemMessage\":false,\"Message\":\"Cooldown.Done\",\"Color\":\"FFFFFFFF\",\"IsPermanent\":false,\"Parameters\":[],\"Tags\":[\"Default\"],\"HasColor\":false}]"
  },
  "Fields": {
    "Version": 8,
    "SaveData": "{\"Fields\":[{\"$type\":\"Sandbox.Engine.RuleTrees.Timer.RtTimerBlackboardFieldData, Sandbox.Engine\",\"ConcreteDefaultValue\":{\"Timer\":0.0,\"TimerState\":0,\"TimerType\":0},\"Id\":\"da2ff520-04c8-420f-ab43-8416a4758059\",\"BlackboardType\":1,\"IsSelectable\":true,\"FriendlyName\":\"PowerUp Loop Time\",\"Mode\":1,\"ValueFormatId\":0}],\"version\":-1,\"dataID\":null}"
  }
}
```

{% endtab %}

{% tab title="Example: Speed" %}

### **Increased Speed**

**Infinitely Triggered**

The player needs to move faster to explore and dodge enemies and objects. They find a pair of shoes that make them move much faster.

<figure><img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FYQQ8eILADlQWpMJiDSe5%2FPower%20Ups%20Speed%20trim.gif?alt=media&#x26;token=f578fc30-3abd-4e2f-a216-aaf0b5cf1930" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Example: Health" %}

### **Health Restoration**

**Repeat Trigger**

The player finds a helmet of restoration while exploring. When they equip it, it slowly restores some of their health for a while.

<figure><img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FazH4OChj2KiPmz072Aft%2FPower%20Ups%20Health%20trim.gif?alt=media&#x26;token=e41044e3-b76d-4e52-8a3d-8bc84c3c1c6e" alt=""><figcaption></figcaption></figure>

**Heal Skill (with Cooldown)**

The player has just equipped a potion pack, giving them the ability to heal themselves every time they press "1" on the keyboard. It has a 30-second cooldown, so they need to use it wisely.

<figure><img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FysOiIQrZjYODwMHoMZhs%2FPower%20Ups%20with%20Keypress%20Heal%20trim.gif?alt=media&#x26;token=8086d30f-f6bd-4c2c-99bf-441eb2a93c3a" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Example:  Damage Resistance" %}

### **Increased Strength**

**One Time, Repeat, or Infinite Trigger**

After killing a boss, the player finds and equips the Armour of Rage. They become much stronger and can now take on other enemies with greater ease while the effect lasts.

<figure><img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FYXzGZxxm3RU6ESGoY2ED%2FPower%20Ups%20Attack%20Power%20trim.gif?alt=media&#x26;token=512bb587-b462-43a5-900f-901abc1b4b0c" alt=""><figcaption></figcaption></figure>

**Defence Skill (with cooldown)**

The player needs to get past some lava and has a full set of protective gear equipped, giving them the ability to increase their defence with a simple button press for 30 seconds.
{% endtab %}
{% endtabs %}

### Trigger Crowd Events

Wear equipment to trigger a Crowd Event for social interaction or cooperative play.

**Use cases:** Dance party/flash mob, complete a puzzle, etc.

{% tabs %}
{% tab title="How it Works" %}
**Start:** In a multiplayer game, the player learns (through a quest, hint, etc.) that a special item (e.g., dancing shoes) will let them start a dance or complete an action requiring emotes.

**Gameplay Steps**

1. **Get Equipment:** Complete a challenge (e.g., parkour) or quest before other players to unlock NPC dialogue to get the item, discover it in a hidden place, etc.
2. **Hint:** Learn what the equipment can trigger and how to equip it
3. **Equipment:** Open Inventory and equip the item
4. **(Optional):** The player learns another item is needed to trigger the Crowd Event and completes the necessary steps to get it

**Outcome:** Players follow the flow of the Crowd Event to complete it.
{% endtab %}

{% tab title="Build It" %}

### Build It

**Simple - Equipping Item(s)**

* <img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2F1DuMFnUv13lWbbezqP9i%2Fimage.png?alt=media&#x26;token=adf11682-9ef9-4c07-93cb-df017f00ade8" alt="" data-size="line">[collectable](https://docs.sandbox.game/en/creator/game-maker/docs/components/actions/collectable "mention") component - <mark style="background-color:orange;">**On Equip**</mark> message (one item), <mark style="background-color:purple;">**Collect**</mark> message.
  * **For multiple equipment or repeat trigger:** Apply **\[**[**Event Count & Check**](#use-on-equip-message-s--event-count-and-check-setup)**]** logic to count events (equipping items) individually and check if an event total is met. Substitute the <mark style="background-color:orange;">**On Equip**</mark> message with `Events.Done` in the rest of the setup notes below.
* **Hint:** Use ![](https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2Fe3VONdgy8QfCGAG04kRu%2Fimage.png?alt=media\&token=6e0d3ae4-5cad-4c4f-8b66-255d2b6ab630)[asker](https://docs.sandbox.game/en/creator/game-maker/docs/behaviours/basic-logic/asker "mention") or [#popup-window](https://docs.sandbox.game/en/creator/docs/game-rules/game-screen#popup-window "mention") to hint at what buff the equipment offers, how long it lasts, and how to put it on once collected it (trigger with the <mark style="background-color:purple;">**Collect**</mark> message).
* **Trigger the Crowd Event**
  * **Anywhere:** ![](https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FpvQ37hvZsM8OoxPTibkV%2Fimage.png?alt=media\&token=e5d1560b-bfb4-4e26-a79a-b2f2241ae0ee)[toggle](https://docs.sandbox.game/en/creator/game-maker/docs/components/status/toggle "mention") <mark style="color:green;">ON</mark> a <img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FYKwcozVAkD8d3umIfSiL%2Fimage.png?alt=media&#x26;token=dbb0fa45-e2cf-40c5-85b0-c6bfb9eccb1d" alt="" data-size="line">[crowd-event](https://docs.sandbox.game/en/creator/game-maker/docs/behaviours/basic-logic/crowd-event "mention") with <mark style="background-color:orange;">**On Equip**</mark> message.
  * **Specific location:** Send the <mark style="background-color:orange;">**On Equip**</mark> message to spawn a <img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FIaOSCnmODVvwrVbCZ3HY%2FGM%20icon%20com%20trigger%20volume.png?alt=media&#x26;token=4b3659f2-40cf-4df3-a6d7-18f16d42c73b" alt="" data-size="line">[trigger-volume](https://docs.sandbox.game/en/creator/game-maker/docs/components/triggers/trigger-volume "mention") that will trigger the **Crowd Event** with a message sent when the player enters the volume.

**Complex - Equipping Item(s) + Portable Crowd Event Trigger**

{% hint style="info" %}
This logic allows multiple players to attempt to collect the equipment and trigger the crowd event by picking up the item that triggers the crowd event.&#x20;
{% endhint %}

* Apply **\[**[**Event Count & Check**](#event-count-and-check)**]** logic to count events (equipping items) individually and check if an event total is met.
* **Hint:** Inform players to collect and equip items, clearly explaining it is required to trigger a Crowd Event if they also find a certain pickable item.
* **Save pickable preset:**&#x20;
  * Create a  ![](https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FHooLbmtByAhogU0mIGo7%2Fimage.png?alt=media\&token=ce83c192-01ac-42ef-a3de-c5b10066089d)[pickable](https://docs.sandbox.game/en/creator/game-maker/docs/components/actions/pickable "mention") asset with custom logic. Set a <mark style="background-color:blue;">**Message on Picked**</mark>.
  * Set a logic asset as the child of the **Pickable** asset and apply <img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FYKwcozVAkD8d3umIfSiL%2Fimage.png?alt=media&#x26;token=dbb0fa45-e2cf-40c5-85b0-c6bfb9eccb1d" alt="" data-size="line">[crowd-event](https://docs.sandbox.game/en/creator/game-maker/docs/behaviours/basic-logic/crowd-event "mention") behaviour and set a <mark style="background-color:green;">**Crowd Event**</mark> **Message Required**.
  * Save as a [**preset**](https://docs.sandbox.game/en/creator/game-maker/docs/build-menus/side-bar/presets) and delete the objects.
* **Spawn pickable preset:** Set an <img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FrFFcp9Gy4XHBzf1svCMl%2Fimage.png?alt=media&#x26;token=c31bc0a1-8009-4fef-8e4c-cde4f1648a28" alt="" data-size="line">[asset-spawner](https://docs.sandbox.game/en/creator/game-maker/docs/behaviours/modifiers/asset-spawner "mention") to spawn the preset with **Required Message** as `Events.Done`.
* **Pickable event tracking:**&#x20;
  * Create a **local (L)** True/False variable with initial value **False**.&#x20;
  * Add a [#edit-true-false-value](https://docs.sandbox.game/en/creator/docs/game-rules/replace-variable-values#edit-true-false-value "mention") rule with **Required Message** as <mark style="background-color:blue;">**Message on Picked**</mark>.
  * Add a [#compare-true-false](https://docs.sandbox.game/en/creator/docs/game-rules/comparisons#compare-true-false "mention") rule with **Required Message** `Events.Done`. Set it to compare the True/False variable to be equal to **True**. Set message **Out** as <mark style="background-color:green;">**Crowd Event**</mark> message.
* **Check Equipment + Pickable**
  * **Key/Mouse Trigger (checks if Equipped, then triggers Pickable check if done):**&#x20;
    * Create a  [#key-input](https://docs.sandbox.game/en/creator/docs/game-rules/triggers#key-input "mention") or [#mouse-input](https://docs.sandbox.game/en/creator/docs/game-rules/triggers#mouse-input "mention") rule to send a `Events.Check` message to check that the event counting for equipment is done.
  * **Pickable Check:** Find the [#compare-numbers](https://docs.sandbox.game/en/creator/docs/game-rules/comparisons#compare-numbers "mention") rule that tracks equipped item count and change its message Out to the `Events.Check` message that checks the Pickable event status.
* **Hint:** Use equip event message `Events.Done` to trigger a hint that the player needs to pick up the special item, place it where they want to start the Crowd Event, and use the key/mouse input you set to trigger a Crowd event at that location (and trigger any number of crowd events they want).
  {% endtab %}

{% tab title="Example: Dance" %}

### **Mystery Dance Parties**

In a social hub, while exploring, you find some shoes and a note telling you about a mysterious person who used to create dance parties wherever they went. If you can find the legendary item to complement the shoes, you too can create endless dance parties for your friends and everyone in the experience.

<figure><img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FyPw69IomGslSwkHZ1jE3%2FCrowd%20Events%20trim.gif?alt=media&#x26;token=7dad2abb-6b61-486e-abca-706f83324e54" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Example: Motion/Action" %}

### **Explorer's Puzzle**

While exploring tombs with friends, you come across an ancient crystal necklace that you realise could be used to open a door that you and your friends couldn’t get past, if you can perform a ritual requiring specific movements. You return to the door with your friends and use emotes to perform the ritual to finally open the door to your next adventure.
{% endtab %}
{% endtabs %}

### Unlock Player Class/Skills

Wear equipment (optional: also pick up a related item) to enable unique interactions or unlock related skills (singleplayer or multiplayer).

**Use cases:** Soft class system (e.g., mage, medic, scientist), special team role (e.g., leader, goalie), technological era reached (e.g., iron age, medieval ages, industrial age), social game roles, etc.

{% tabs %}
{% tab title="How it Works" %}
**Start:** Players are informed to wear a full set of equipment to unlock a unique role and skills.

**Gameplay Steps**

1. **Get Equipment:** At game start or between levels, players find items in storage, a shop, etc.
2. **Hint:** Learn player roles depending on which each equipment set is worn and how to wear it&#x20;
3. **Equip:** Open Inventory and equip the set of items
4. **Hint:** Learn how to use skills related to the role accepted (which may include key inputs) and learn how to get a pickable item that may be needed (e.g., to shoot projectiles)
5. **(Optional):** The player picks up an needed item (e.g., blaze staff) to unlock full skills

**Outcome:** The player can now use skills unique to their role. Other equipment may later be available to grow the player's skills. They could even change to a different role during the game.
{% endtab %}

{% tab title="Build It" %}

### **Example: Horde Mode (Mage)**

* **Place the Equipment:** First, place the equipment you will use into the game world and ensure it is a collectible component with the "on equip" message filled with a simple message for the later check.
* **Add a Pickable Item:** This can be any item, but in our example, we will use a magic wand. The item needs to be set up as pickable, and we also need to attach a spawner behaviour to the wand.
* **Linking Items Together:** Attach the spawner behaviour to the wand. Place the spawner behaviour at the front of the wand where you want the fireball to fire from. Open the hierarchy on the left side panel. Find the wand and logic, then drag the logic over the wand to link them together. If done correctly, when you move the wand, the logic with the spawner behaviour should also move with it.
* **Create the Fireball:** Create a fireball asset or any asset you want and put a projectile behaviour on it. Set it up to destroy on collision and fire at the start of the experience. No message setup is needed. You can also send a message on collision with an object, such as a health message with a negative value to damage the enemy.
* **Add a Speaker:** Add a speaker to the fireball asset, ensuring it is set to detect entity. Change the detection range to its maximum and enable the "face entity" toggle. Change the detection to a specific tag and use a memorable tag for the enemy. Save this as a preset and give it a name.
* **Spawner Behaviour:** Go back to the spawner and toggle the "use preset" option, selecting the fireball as the asset to fire. Change the spawn message to something memorable. Toggle "only once" and adjust the seconds between spawns as needed.
* **Add a Variable:** Set up a variable in the rule system to check if the mage outfit has been equipped. Name this variable as desired.
* **Add a Math Rule:** Add 1 to the variable if the trigger message from the "on equip" is triggered, indicating the item has been equipped.
* **Compare Values:** Set up a compare value to check if the item is equipped. Assign a message like "check fire" to trigger this rule. If the variable equals 1, send the message that triggers the spawner to fire.
* **Add Mouse or Keyboard Controls:** Add the trigger events rule and set it to your preferred setting. Change the message to the "check fire" message that the compare value needs. This setup will check when the player presses the fire key to ensure they have the equipment. If they do, it fires the fireball; if not, it does nothing.
  {% endtab %}

{% tab title="Example: Mage" %}
**Horde Mode**

You and a few friends are playing a horde mode game where endless waves of enemies keep coming at you. You have equipped the mage outfit and picked up your staff. Using key presses, you can fire a fireball, shoot lightning, and hit an area with ice. Your friends have taken on roles such as healers, damage dealers, and tanks. Together, you must survive wave after wave of enemies and see how long you can last. For this to work each character needs to use a projectile to hit the enemies and enemies to hit the players.

<figure><img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FTwQ3YEke6goVVUV4iYaU%2FClass%20System%20Horde%20Mode%20trim.gif?alt=media&#x26;token=efca89e3-2ec5-4f07-b879-712b685fd75d" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Example: Roleplay" %}

### **Social Game**

In a social game, you have chosen to be the doctor. Your job is to go around healing people and reviving them whenever possible. Your friends have taken on other social roles, like a police officer or delivery driver. Together, you need to earn money and collectively pay your rent; otherwise, the landlord will kick you out, causing you to lose the game.

<figure><img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FUKw2ouHx4WXUlRulWEEf%2FClass%20System%20Social%20Game%20trim.gif?alt=media&#x26;token=7fafe3ef-2ea4-4a9f-a9c7-a1f16f910036" alt=""><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}

### Activate Equipment

Complete minor events to activate an equipment item's usefulness.

**Use cases:** Recharge, repair, upgrade, restore magical power, etc.

{% tabs %}
{% tab title="How it Works" %}
**Start:** The player learns they must complete multiple events to activate and use equipment.

**Gameplay Steps**

1. **Get Equipment:** Discover via hints/exploration, given by an NPC, or buy/trade/craft, dropped from killing an enemy, etc.
2. **Hint:** Learn the equipment's use and what events must be completed to activate it
3. **Event(s):** Carry out all required actions to activate the equipment, which may include setting it down, gathering materials, using a workbench, etc.
4. **Equip:** Collect the equipment again if necessary, then open Inventory and equip the item
5. **Hint:** Learn how to use the equipment and what to do if the equipment's use eventually ends (e.g., battery needs charging)
6. **(Optional):** If the player must repeat the events to re-activate the equipment later, trigger a notification when the equipment's effects expire with simplified instructions to restore it

**Outcome:** The player may use the equipment's benefit for the rest of the game, or they may use it for short periods and then re-activate it in cycles.
{% endtab %}

{% tab title="Build It" %}

### Build It

Each event counted will be a step in the process to activate equipment. Equipping an item is one of the steps required. This may mean many steps are counted to equip a full set of items, then complete additional actions to finish the remaining steps to activate the equipment.

**Equipment**

* You must use **\[**[**Event Count & Check**](#event-count-and-check)**]** logic to count events (equipping items + other small tasks) individually and check if an event total is met.
* **Hint:** Use ![](https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2Fe3VONdgy8QfCGAG04kRu%2Fimage.png?alt=media\&token=6e0d3ae4-5cad-4c4f-8b66-255d2b6ab630)[asker](https://docs.sandbox.game/en/creator/game-maker/docs/behaviours/basic-logic/asker "mention") or [#popup-window](https://docs.sandbox.game/en/creator/docs/game-rules/game-screen#popup-window "mention") to hint at what the equipment can do and how to equip it (trigger with an equipment item's **Collect** message).
* **Hint:** Once equipped, trigger a hint to inform the player what steps are needed to activate the equipment and what to do if it breaks, runs out of fuel/battery, loses magical power, etc.\
  **Note:** It may be best to allow the player to use the equipment once, then trigger this message to learn what to do to re-activate it.

**Outcomes (some options)**

* **Charge equipment:** \
  **Note:** Though event tracking may not be needed for this flow to work, it can be very useful for situations where logic can't communicate smoothly with each other and can be counted easily via Game Rules.\
  **Note:** This requires collectable and pickable components, which are not compatible because both use `Interact` to trigger. To work around this (example):
  * **Event 1:** The player collects an equipment item.
  * **Event 2:** The player drops it at a charge base, which sends a Drop message.
  * **Event 3:**&#x20;
    * The Drop message triggers Actor Property Switcher to turn on visibility and collisions for an identical equipment asset on the charge base (not collectable) and triggers a timer in Game Rules to start.&#x20;
    * When the timer is finished, a message Out spawns a collectable version of the equipment asset with an On Equip message.
    * The On Equip message triggers Rules to check if all events are done.
    * `Events.Done` triggers other logic that provides for the equipment's utility.
* **Fix broken equipment:**
  * **Event 1:** Place broken equipment at a workbench
  * **Event 2, 3, and 4:** Place a specific part/resource (wood, transistor, etc.) at a workbench
  * **Event 5:** Interact with the workbench to do the repair (starts a timer that appears on the HUD as a Progress Bar).
  * **Event 6:** Player equips the fixed equipment, which triggers `Events.Done` and activates the equipment's utility again.
* **Restore an item's power:**
  * Event 1: Place the item on an altar in a holy place
  * Event 2: Collect holy water from a cistern near the altar
  * Event 3: Interact to wash evil from the item on the altar with the holy water
  * Event 3: Interact to pray to a god to restore the item's power, which triggers `Events.Done` and activate the items utility.
    {% endtab %}

{% tab title="Example: Recharge/Refill" %}

### Power Tools

In a resource management game, you need to power tools to get the job done. Over time, you'll gradually get more efficient equipment to keep your costs down. Each power tool has its own energy needs (electric, gas, etc.) that you must supply to keep your operation running smoothly.

**Example:**

* **Event:** recharge/refill equipment (e.g., place on a charge base, fill with gas, etc.)
* **Event:** equip charged/refilled item to use it
* **Re-activation:** Set up another counter to decrease battery/gas % on HUD each time you keypress to use the equipment so the player will know to recharge it
  {% endtab %}

{% tab title="Example: Fix/Upgrade" %}

### Equipment Repair and/or Upgrade

Properly working equipment is vital if you want to explore new areas, gain more resources, survive, etc. When it wears down eventually, you must use your workbench and the right collected materials (e.g., ore, leather, copper wiring, etc.) to fix it and/or upgrade it since it's not easy to buy new equipment in your situation.

* **Event (any number):** If necessary materials are collected, interact with a workbench to fix/upgrade equipment
* **Event:** equip repaired/upgraded item to use it
* **Re-activation:** Set up another counter to decrease the equipment's wear on HUD each time you use it so the player will know to repair it, and notify when it can be upgraded
  {% endtab %}

{% tab title="Restore" %}

### Holy Relic

You are an adventurer seeking a legendary relic to save your kingdom, but when you discover it you realize it no longer emits its holy light. Ancient scripts detail how it was blessed by a god ages ago, so you follow the ritual to see if you can restore its power. However, there could be more potential hidden in the relic if you prove yourself worthy to the gods who may bless it.

* **Event (any number):** place a (pickable) shard of the relic on an altar
* **Event:** Pray to a diety to restore its powers
* **Event:** Equip item to unlock godly powers to use on command
* **(Optional):** The player may complete new events to make the item even more powerful, or they may fall out of favor with the god and approach another god to give it a new power
  {% 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/creative-guides/logic-guide/equipment-based-logic-on-equip-nft-sensor.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.
