LogoLogo
GeneralAccountsPlayersOwnersCreatorsThe Sandbox Website
Creators
Creators
  • 🎆Welcome to the Creator Portal
  • 🟦Learn Creator Basics
    • 🟦Scale & LAND Use
    • 🟦Assets & Equipment
    • 🟦Avatars & Character
    • 🟦Look & Feel
    • 🟦Logic & Gameplay
    • ❓FAQs: Gameplay
    • ❓FAQs: Assets
    • 🧙‍♂️Begin Game Maker (Video Series)
  • The Sandbox Creators Forum
  • The Sandbox DAO
  • 🪙Monetisation
  • Game Maker
    • ✨Create Experiences
    • 🔰Beginners
      • Play/Test
      • Build with Blocks
      • Place Assets
      • Set Object Actions
      • Trigger Logic
      • Craft Quests
      • Set Up Mechanics
      • Build Multiplayer Games
    • Game Maker 0.11 Update
    • 0.11 Upgrade Guide
    • 📖Docs
      • Navigate Game Maker Home
      • Manage Experiences
      • Controls & Shortcuts
      • Build Menus
        • Top Bar
          • Gameplay
        • Side Bar
          • Hierarchy
          • Presets
        • Library & Quick Access Bar
        • Grid System & Snap Tool
        • Properties Panel
      • Using Blocks
      • Using Assets & Objects
        • Behaviour & Component Parameters
        • Tags
        • Messages
      • Behaviours
        • NPC - AI Pawns
          • 🔵Citizen
          • 🔵Farmer
          • 🔵Healer
          • 🔵Melee Enemy
          • 🔵Predator
          • 🔵Prey
          • 🔵Soldier
          • 🔴Friendly NPC
        • Movement
          • 🟡Door
          • 🟡Bird
          • 🔴Basic Platform
          • 🔴Advanced Platform
          • 🔴Projectile
          • 🔴Rotate
        • Basic Logic
          • 🔵Message Broadcaster
          • 🟢Combination Code
          • 🟢Asker
          • 🟢Timed Events
          • 🟡Crowd Event
          • 🔴Spawn Point & Avatar's Feature
        • Modifiers
          • 🔵Actor Property Switcher
          • 🔵Multi
          • 🔵Void
          • 🟢Asset Spawner
          • 🟢Replace Asset
        • Visual
          • 🟢Post Process Effects
          • 🟡Weather Switcher
          • 🟡Animated Decoration
      • Components
        • Actions
          • 🟢Climbable
          • 🟢Avatar Teleport
          • 🟢Collectable
          • 🟢Drop
          • 🟢Slide
          • 🟢Speaker
          • 🔴Pickable
        • Triggers
          • 🟢Plant
          • 🟢Switch
          • 🟢Button
          • 🟢Trigger Volume
        • Status
          • 🟢Toggle
          • 🟢Power Up
          • 🔴Avatar Checkpoint
          • 🔴Health
        • Gameplay
          • 🔵Defeat
          • 🔵Victory
          • 🔴Raycast
        • NFT
          • 🟢NFT Sensor
          • 🟢NFT Image Display
          • 🟢Image Display
          • 🔴NFT Details Display
        • Display
          • 🟢Indicator
          • 🟢Rarity VFX
          • 🟡Visual FX
          • 🟡Light
        • Audio
          • 🟡Play Sound
      • Objectives
      • Game Rules
        • Math
        • Time
        • Comparisons
        • Replace Variable Values
        • Game Screen
        • Triggers
        • Events
      • Build Singleplayer & Multiplayer Logic
      • Quality Guidelines
        • Optimisation
        • Testing
        • Playability
      • Templates
    • 📑Creative Guides
      • 📗Game Rules Guide
        • Point Race
        • Collect Points
        • Time Trial
        • Combo
        • Hunger
        • Poison
        • Shop
      • ⚙️Logic Guide
        • Abilities
        • Equipment Based Logic - On Equip / NFT Sensor
        • Doors & Chests
        • Collectibles
        • Text, Quests & Icons
        • Platforms
        • Victory & Defeat
        • Miscellaneous
        • NFT Inspect
        • Fighting
      • 🏞️Experience Guide
        • Tower Defense
        • Horror / Backrooms
        • Solo Platforming
        • Social Platforming
        • Resource Management
        • Cooking Simulator
        • Survival
        • Action / Adventure
        • Night Clubs & Concerts
        • Virtual Home & Architecture
        • NFT Gallery / In-Game Shop
        • Puzzle Games
        • Social Hubs
        • Simulation
      • 🎲Experience Design Techniques
        • Narrative Design
          • Worldbuilding
          • Storyboard
          • Dialogue
        • Art Design
          • Experience Art Concept
          • Asset Curation
          • Blockout Aesthetics
          • Detailing / Dressing
        • 3D Spatial Layout
          • Rough Base Map
          • Greyboxing / Blockout
        • Game Design
          • Ramp of Difficulty
          • Risk & Reward
          • Game Loops & Decisions
    • 🎬Game Production Guide
      • 🟥Concept
      • 🟧Blockout
      • 🟨Logic
      • 🟩Art
      • 🟦Quality Assurance
      • 🟪Polish
      • ⬜Marketing
    • 🧰Publish Experiences
      • Experience Manager
        • Experience Analytics
        • 🧰Experience Page
          • Content Guide
          • Marketing
          • Create an Experience Trailer
          • Player Engagement
        • Map Location
        • Asset Review
        • Access Restrictions
      • Collaborating With Third Parties
      • ❓FAQs: Experience Publishing
    • 🕘Version Notes & Changelogs
      • Game Maker 0.11
        • ❗0.11 Upgrade Guide
      • Game Maker 0.10
      • Game Maker 0.9
      • Game Maker 0.8
      • Game Maker 0.7
    • ❓FAQs: Game Maker
  • VoxEdit
    • ✨Create Assets
    • 🔰Beginners
    • 📖Docs
      • Navigate VoxEdit Home
      • Controls & Shortcuts
      • Panels & Custom Layouts
      • Block
      • Modeler
        • Use Modes & Tools Together
        • Set the Pivot Point
        • Create Frame Assets
      • Animator
        • Build a Rig
        • Create an Animated Asset
        • Use Inverse Kinematics
      • Templates
      • Quality Guidelines
        • Asset Types & Collisions
        • Asset Scale
        • Node Efficiency
        • Pivot Point & Alignment
        • Animation
        • Visual Quality
        • Asset Name & Description
        • Manage Files & Folders
    • 📑Creative Guides
      • 🧍Asset Guide
        • Structures & Landmarks
          • Basic Building: No Entry
          • Animated Building: No Entry
          • Unanimated Building: Player Entry
          • Landmark
          • Building Facade
          • Structure Component Parts
          • Modular Architecture
        • Humanoids & Animals
        • Vehicles
        • Equipment
        • Art: Statues, Paintings
          • Animated Art Screens
          • Statues
          • Kinetic Art Sculptures
          • Paintings
          • Performance Art
        • Furniture
        • Platforms
        • Doors, Gates, and Windows
          • Multi Design Door Asset
        • Chests & Other Animated Interactions
        • Plants, Trees
        • Objects, Machines
        • Signs & Text
        • Obstacles
        • Create Frame Assets
      • 🎨Art Techniques
        • Asset References
        • 3D Design
          • 🧹Need to Simplify?
          • ✂️Trim All Volumes
          • 🟢Optimize with Texture
          • 🟢Curved Edges: Blocky Style
          • 🟡Break Down Objects
          • 🟡Create Smooth Angled Lines
          • 🟡Circular Shapes: Cross Technique
        • Colour, Texture & Depth
          • 🪅Colour Choice & Strategy
          • 🧱Textures & Materials
    • 🧰Upload Assets to Workspaces
    • 🌟Mint & List Assets to Sell
    • 🕘Changelogs
    • 🔓Open Source Assets
    • ❓FAQs: VoxEdit
  • Creators Program
    • 🏗️Builders' Challenge
      • Rules & Eligibility
      • Earnings & Rewards
      • How to Succeed in the Builders' Challenge
      • ❓FAQs: Builders' Challenge
    • ℹ️Creator Contests
    • 🏆Game Jams
      • Rules & Guidelines
      • Judges & Voting
      • Explore Past Winners
      • ❓FAQs: Game Jams
    • 🏆VoxEdit Contests
      • Rules & Guidelines
      • Judges & Voting
      • Explore Past Winners
      • ❓FAQs: Voxel Art Contests
  • General
    • 📚The Sandbox Documentation
    • 🔄Play, Create & Earn
    • 🗺️Map
    • 🛒Marketplace
    • 🗣️Discord Community
    • 🔗Social Networks, News & Blogs
    • The Sandbox Linktree
    • ❓Help & Contact
Powered by GitBook
LogoLogo

INFO

  • Discord
  • Social, News & Blogs
  • Service Status

PLAY

  • Events
  • Map
  • Avatar

CREATE

  • VoxEdit
  • Game Maker
  • Contests

OWN

  • SAND
  • LAND
  • Staking

Copyright ©The Sandbox. All Rights Reserved.

On this page
  • Begin Game Maker 5
  • Trigger Logic with Messages
  • Follow Up
  • Relevant Resources
  • Forum: Community Ideas & Support
  • Other "Begin Game Maker" Videos

Was this helpful?

  1. Game Maker
  2. Beginners

Trigger Logic

This activity is included in an 8-part, 1 hour series to learn Game Maker. Short, focused topics with guided practice will give you practical experience building useful logic for creating games.

PreviousSet Object ActionsNextCraft Quests

Last updated 5 months ago

Was this helpful?

Begin Game Maker 5

Trigger Logic with Messages

MEDIUM

In this activity, you will learn how to set up behaviors and components to create simple logic systems with objects as you explore the basics of communications in Game Maker using messages to create cause and effect.

Launch Game Maker

  • Open or create an Experience and move to an area with empty space.

  • Let's turn the grid off and focus on logic.

Some behaviors and components are only available as [MP], which means they are multiplayer synchronized. For this activity, choose [MP] only when a [SP] option isn't available.

Designing gameplay with [SP] and [MP] logic will be explored later.

Collisions & Messages

Behaviours and components are needed to make objects active and/or interactive. This logic provides a framework so messages can be sent and received to trigger gameplay events.

Tags and Broadcast Type allow for greater control over how events are triggered.

Add the following objects to the viewport:

Pressing E next to an object sends the message Interact to it.

Test (Press TAB)

  • Press E to interact with each door. One door is only a prop. The other animates to appear open and turns off its collisions so players can pass through.

Most objects must have collisions to prevent players from passing through them. You can control if an object has collisions, is visible, or has gravity in the Properties Panel.


Toggle Behaviours On/Off

A message sent to an object's Toggle component can turn it's behaviour on or off. Think of it as locking or unlocking a behaviour.

Add an object that sends a message:

Add two objects in range (the yellow sphere) of the first object to receive the message:

Test (Press TAB)

  • Neither door can be opened. Interact with the panel to send its message, and then:

    • One door opens

    • The other door's behaviour is toggled on so players can open the door with E.

Trigger & Filter Messages

Add the following objects to the viewport:

TRIGGER: AVATAR DETECTED Message sent to everything in the Experience (location doesn't matter)

TRIGGER: OBJECT COLLECTED Message sent to specific objects

Alternative Method: Add a tag to the door, set the key to broadcast the message to SpecificTagsInRange, and adjust the key's broadcast range to include the door's location.

TRIGGER: TAG DETECTED Message sent to self (when the object detects a specific tag in range)

Test (Press TAB)

  • Trigger doors A, B, and C to open based on the logic set up. Imagine ways to use these simple trigger methods for other design needs!

One Message to Trigger Multiple Objects

Build hidden logic into your Experience with invisible and collision-free Logic Assets.

Add the following objects to the viewport:

TRIGGER: AVATAR DETECTED INSIDE A VOLUME

Test (Press TAB)

  • The lights do not move with the car. Let's create a relationship in the hierarchy to fix that.

Modify

Set the "Headlight" assets to move with the car's platform motion. Open the hierarchy, select them, and drag them onto the Car. This makes them child objects and the car the parent object.

Test (Press TAB)

  • The location of the "Headlight" assets is now controlled by their parent object's motion.

Messages with Arguments

Some special messages appear in yellow and allow you to send information (an argument) with a message.

You can also create custom messages with arguments that will appear yellow in the message dropdown list. These will be explored in a later activity.

Continue with the previous example so weather and the streetlight will gradually change.

Add objects to communicate special messages:

Modify existing objects to receive the special messages:

Test (Press TAB)

  • The weather and streetlight gradually change using these special messages.

Save your Experience so this logic is available for use in another activity.

Follow Up

This activity introduced new tools and concepts to understand objects more and how to make them communicate in custom ways.

In the next activity, you will learn to integrate quests with some of the logic from this activity so you can begin designing a flow for players with clear guidance to play through your Experience.

Ready for More Practice?

This activity leaves room for you to test out your own ideas when the player exits the Trigger Volume and the message Day is sent. Test out custom weather profiles and light colours, too!

Remember that the special message LightColor sets transition timing and colour.


Triggering logic is a deep, complex topic. The resources below are beginner friendly so you won't feel overwhelmed. We'll add more to later Begin Game Maker resource sections when topics are covered.


Forum: Community Ideas & Support


Other "Begin Game Maker" Videos

Play/Test
Build with Blocks
Place Assets
Set Object Actions
Trigger Logic
Craft Quests
Set Up Mechanics
Build Multiplayer Games

There are . We'll explore more later.

Relevant Resources

🔰

Asset: Door (any) No behavior

Asset: Door (any) Door behaviour

Asset: Museum Info Panel

Button component

  • Message to Send: Door.Unlocked

  • Broadcast Type: EveryoneInRange

Create a custom message by typing it into the message field and click to Add it.

Asset: Door (any)

Door behavior

  • Message to Open: Door.Unlocked

Select the existing message from the message dropdown list.

Asset: Door (any)

Door behavior

  • Message to Open: Interact

Toggle component

  • Turn On Message: Door.Unlocked

  • Initial Behaviour State: False (behavior inactive at game start)

Asset: Door (any) Name: DoorA

Door behaviour

  • Message to Open: DoorA.Open

Asset: Ancient Lever

Message Broadcaster behaviour

  • Message to Send: DoorA.Open

  • Broadcast Type: All

  • Wait Before Broadcast: True

  • Message Required: Interact

Asset: Door (any) Name: DoorB

Door behavior

  • Message to Open: DoorB.Open

Asset: Key (any)

Collectable component

  • Message On Collect: DoorB.Open

  • Broadcast Type: SelectedActors

  • Broadcast Targets: DoorB

Asset: Door (any) Name: DoorC

Door behavior

  • Message to Open: DoorC.Open

Speaker component

  • Detection Type: SpecificTagsinRange

  • Include Tags: DoorC.Key

  • Message to Send: DoorC.Open

  • Broadcast Type: Self

Asset: Key (any) Tag: DoorC.Key

Pickable component

Asset: Logic Asset

Trigger Volume component

  • Detection Type: EveryAvatarInRange

  • Detection Shape: Box

  • Detection Area: x15 y5 z15

  • Enter Message: Night

  • Exit Message: Day

  • Broadcast Type: All

Asset: Car (any)

Basic Platform behaviour

  • Move Offset: x0 y0 z5

  • Look at Destination: True

Toggle component

  • Turn On Message: Night

  • Initial Behaviour State: False (behavior inactive at game start)

Asset: Weather Asset Name: Night

  • Message Required: Night

  • Profile: Night

Asset: Luxury Street Light

(prop with no logic)

Asset: Logic Light Asset Name: Street Light Position: Luxury Street Light (point down)

  • Light Type: Spot Light

  • Starting State: Off

  • Spot Angle: 15

  • Message Turn ON: Night

  • Message Turn OFF: Day

(2x) Asset: Logic Light Asset Name: Headlight Position: Car headlights (point forward)

  • Light Type: Spot Light

  • Starting State: Off

  • Spot Angle: 15

  • Message Turn ON: Night

  • Message Turn OFF: Day

Asset: Logic Asset Name: Street Light Trigger

Message Broadcaster behaviour

  • Message to Send: LightColor

  • Time: 10

  • Wait Before Broadcast: True

  • Message Required: Night

Asset: Logic Asset Name: Weather Trigger

Message Broadcaster behaviour

  • Message to Send: WeatherFade

  • Time: 10

  • Wait Before Broadcast: True

  • Message Required: Night

Asset: Logic Light Asset Name: Street Light

  • Message Turn ON: Night

  • Message Turn ON: LightColor

Asset: Weather Asset Name: Night

  • Message Required: Night

  • Message Required: WeatherFade

➕
🟡

A forum post has been created for this learning activity! Visit to:

  • Ask or answer questions

  • Post ideas about the topic

  • Share what you've learned or created

    • from the activity

    • from the bonus resources

Cover
Logic & Gameplay

Learn about triggering common game events and get a clear big picture view of logic use in Game Maker

Cover
Logic

Use our general guidelines to efficiently build logic that fits your skill level as you create your Experience

🟦
🟨
Visit the Forum
Cover
many more ways to send messages