How To Use Equipment To Create Great Games, Part 1: NPC Interactions

We’re breaking down some of the many uses of the On-Equip feature in this multi-part series.

The Sandbox
6 min readJul 5, 2024

The Sandbox Game Maker offers many tools to make no-code game creation a reality. Of the many tools at a builder’s disposal, the “On-Equip” feature stands out as one of the most versatile. When used correctly, On-Equip is a versatile feature that enables creators to enhance player experiences through interactive gameplay mechanics.

This diverse feature allows items, when equipped by players, to trigger specific actions or effects within the game world. By strategically incorporating On-Equip mechanics, creators can introduce new layers of interactivity and engagement.

To help creators like you gain a better understanding of all this tool has to offer, we’ve created an multi-part series examining potential use cases for the On-Equip feature, unpacking ways creators can utilize it to trigger different effects, further level development, or create a more dynamic player experience.

Each week, we’ll publish another article in this multi-part series so you can learn how to maximize the On-Equip feature and make it your own. All examples will use existing rules and features so that you can easily replicate them in your own experience.

So, pull up the latest version of Game Maker and get ready to see what’s possible with the On-Equip feature! This week, we’re unpacking NPC interactions…

This article is part one of an 11-part series about using On-Equip, to read more, click one of the links below:

  1. Part 1: NPC Interactions
  2. Part 2: Toggling Between States
  3. Part 3: Hex or Impede Players
  4. Part 4: Trigger Unique Interactions
  5. Part 5: Create Class-Based Systems

Using Equipment for NPC Interaction

One of the best and most prominent use cases for On-Equip comes in the form of transforming NPC interactions based on the equipment a player has in-game. By using the On-Equip Toggle on collectible items, players can unlock new dialogues, gain access to restricted areas, or embark on special quests based on their equipped gear.

How This Could Appear in Your Game or Experience

Players who join your experience or visit an area of your map may come across an NPC. When they try to interact with the NPC, they could be met with silence or be informed they are not dressed properly. As a creator, you can determine how you want the NPC to react to a player as a way to guide them to complete the “On-Equip” action.

Now, players are aware that they are missing something. Players can then discover pieces of equipment through quests or exploration. When they pick these items up, they’re added to the player’s inventory, each with an On-Equip Message that you can set up. When a player equips the necessary gear, whether a complete set or just a single piece, the game detects this action and prepares specified NPCs to respond differently.

Making sure a player knows that what they pick up is important. You can design your game or experience so that when the player collects the first piece of gear, a pop-up box instructs them to open the inventory with the “I” key and equip the item using the “E” key while the item is selected in the inventory. The pop-up is dismissed once the On-Equip action is detected.

Now that the equipment is being worn, players can visit or revisit the NPC that requires them to have the items equipped. If this is their second interaction with the NPC, a different interaction will be triggered by the appearance of the new equipment. This interaction could grant access to a restricted area, open a door, or offer a new quest!

How to Implement

To use equipment for NPC interactions, it’s important to understand that NPCs have a default message via an Asker behavior, informing the player they do not have the correct outfit or are unrecognized. This will give the player the hint they cannot pass or access the next section. Equipment items are collectible through quests or exploration, and they need to have the component for the collectible attached to them. Ensure the On-Equip option is selected and a Trigger Message is set up for each piece of equipment. For ease, use the same message across all the pieces of equipment.

Using the Rule System, set up a variable that tracks the trigger message. This is done by first setting up a Variable and giving it a name. Then, set up a Math Rule set or Compare Value and increase or set the value as the players trigger the On-Equip message. Increment the variable each time the message is triggered; this is why it’s useful to have the same message for each piece.

Once all items are equipped, speaking to the NPC sends a message to the Rule System to compare values. This is done by adding a message that checks the variable; the rule for this is “Compare Values.” This compares the variable with a number you have set to see if the player has the correct number. If the variable total equals the required number, trigger a message to make the NPC acknowledge the player and unlock or trigger the next action. You may also swap the asset to another NPC that may have a different animation or dialogue. This can be done via the “Swap Asset Behavior.”

Potential Ways to Use Equipment for NPC Interaction

Most creators have likely seen this sequence play out in games before, generally RPGs. Now, with On-Equip, you can add this layer of depth to your latest creation!

One instance this could be used could involve a quest for a Roman soldier. The player might encounter a soldier who dismisses them at first, as he is only interested in a brave soldier to aid his quest. However, after acquiring and equipping a full set of Roman armor, the player can return to the soldier, who will then ask for their help in defeating a powerful enemy.

Similarly, if trying to gain entry to an exclusive dinner party, a player might be turned away for not wearing a suit and tie. By finding or renting the appropriate attire and returning to the party, the player will be allowed entry by the guard.

Maybe you’re inspired to create a zombie game. You want to have a quest where the player must sneak past zombies. Initially, the zombies can detect the player easily. However, by killing a zombie and equipping its blood-stained clothes, the player can move around undetected for a limited time.

Equipping specific items can significantly alter NPC interactions in your game, adding depth and variety to player experiences.

Something to Keep in Mind

While the On-Equip is a great tool, you will want to make sure that you use it correctly to avoid issues in gameplay. On-Equip currently detects if an item is equipped but does not detect if it is unequipped. This means that you will need to set up other logic to remove the effects of equipping an item, or its effects will be permanent.

Unleash Your Creativity With On-Equip

By strategically utilizing On-Equip mechanics, game designers can introduce new layers of interactivity and immersion into their creations. Whether triggering special quests or unlocking hidden dialogues, this feature opens up endless possibilities for engaging players.

Get started today and discover the transformative potential of the On-Equip feature in shaping your gaming experiences in The Sandbox, and stay tuned for Part II: Using Equipment to Toggle Between States!

--

--

The Sandbox
The Sandbox

Written by The Sandbox

A Decentralized Gaming Ecosystem Made By Players (sandbox.game // twitter.com/thesandboxgame)

No responses yet