How To Use Equipment To Create Great Games, Part 2: Toggling Between States

The Sandbox
5 min readJul 12, 2024

--

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

We’re back for the second installment of our series chronicling the many uses of The Sandbox Game Maker’s “On-Equip” feature.

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.

Ready to learn more? Update to the latest version of Game Maker and prepare to see what’s possible with On-Equip!

This article is part two 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 to Toggle Between States

Picture Batman. With his eyes, he can only gather so many clues from a crime scene. But when Batman activates his bat-lenses, he can switch to Detective Mode, where he can see things like footprints and clues.

Headgear can allow players to switch views, revealing hidden clues or new areas. This toggle can be controlled through mouse buttons or keyboard keys, enabling seamless transitions between different game states.

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 instance where there is seemingly nothing else they can do to move forward with their quest. That is, until they find or are given a piece of headgear that allows them to switch between different states!

The circumstances by which the player comes to own the headgear are in your hands. Once obtained, the player is instructed to equip the item, either through a pop-up message or by an NPC explaining how to use the headgear. This pop-up should also explain which key or mouse button is being used to toggle between the two worlds. The pop-up will stay active until closed by the player by pressing OK, making sure they don’t miss it.

You may want to experiment with setting up keyboard controls to make it easier for the player to shift between the two states that you create via button press, depending on the nature of your game.

Once the player has access to the toggle, they can journey through the experience, solving quests, hunting enemies, finding clues, discovering new areas, opening closed doors, and finding hidden platforms depending on the abilities you assign to the gear.

How to Implement

To use equipment to toggle between states, the player must find or be given a piece of headgear with the collectible component and the On-Equip Message attached. Setting up the On-Equip Message involves several steps. First, establish a variable to monitor the headgear’s equipped status. This is done using a trigger message linked to the equipment.vThe Math Rule is used to tell the game that the player is either wearing the headgear or not. Changes to the game world will be tied to this action.

Keyboard or Mouse Controls should be set up to trigger rules inside the game. Once the button is pressed, a check message must be sent to the rule system to see if the headgear is equipped. To set up this rule, look for Trigger Event in the rule system.

For reverting changes, implement mechanisms to switch the game world back to its pre-headgear state. This can be done either through another key press or by releasing the mouse button to send a clear message to the rule system. Ensure this message resets all world changes, including assets and visual elements affected by the headgear.

Attach clear components to each affected asset for seamless vanishing upon activation of the clear message. Additionally, set up fallback logic for VFX and weather changes to return them to default settings upon clearing.

This structured approach ensures that the headgear feature not only enhances gameplay with interactive elements but also maintains clarity and responsiveness in-game world dynamics triggered by player actions.

Potential Uses for Toggle Between States

Most creators have likely seen headgear be used in video games, most commonly in shooters when the player switches to night vision mode. Batman games also often use headgear.

Implementing On-Equip in your game can add depth and variety to player experiences and enhance gameplay. For instance, in a ghost-hunting game, players might start as novice investigators, ignored by seasoned ghost hunters. However, after acquiring and equipping a full set of ghost-hunting gear, including “Ghost Goggles,” the player gains the ability to see ghosts! The goggles allow players to switch between normal and ghost views, enabling them to find and hunt down the ghosts, clearing places of all ghost activity.

In a spy mission scenario, players initially face the challenge of navigating through dark environments where visibility is minimal. They might struggle to find important items or avoid detection. By equipping night vision goggles, players can see better in the dark, highlighting items of interest and crucial paths. This equipment is essential for staying out of the light and moving stealthily through enemy territory. The night vision goggles transform the gameplay experience, making stealth missions more engaging and authentic.

For a co-op temple adventure, players might begin their journey with limited access to certain areas of the temple. Upon discovering and equipping ancient headpieces, they can alter the temple’s environment. Each headpiece allows one player to toggle platforms and hidden doors on the other player’s side of the temple. This mechanic requires precise coordination and timing, as players must work together to avoid traps, open doors, and create paths. The headpieces enhance the cooperative aspect of the game, making the adventure more interactive and challenging.

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.

Toggle Between States can detect if an item is equipped but cannot detect if a player unequips it. This means that any changes triggered by equipping the item cannot be undone when it is unequipped. Developers must design their mechanics to accommodate this limitation, ensuring a smooth and consistent gameplay experience.

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 enhancing the realism of a stealth mission, adding cooperative challenges, or intensifying the thrill of ghost hunting, On-Equip mechanics enrich the gameplay experience and deepen player involvement.

Get started today using The Sandbox Game Maker and discover the transformative potential of the On-Equip feature in shaping your gaming experiences in The Sandbox, and stay tuned for Part III: Using Equipment to Hex or Impede the Player!

--

--

The Sandbox
The Sandbox

Written by The Sandbox

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

No responses yet