➑️Button

Trigger an action when pressed.

GAME MAKER 0.10 UPDATE

This logic was moved from a behaviour to a component for more interconnection of logic. Documentation is being updated.

​

  • Interacting with this button will send a message to all assets within its broadcast range - This message can trigger events such has: open a door, destroy an asset, heal the player, etc.

PERFORMANCE TIP In multiplayer Experiences, there are two layers of logic that will not communicate with each other: singleplayer [SP] and multiplayer [MP]. For best performance, only apply [MP] behaviours and components to objects that MUST be synchronised to all players (or communicate on that layer), and maximise use of the [SP] (Client Only) layer.

USAGE TIP Button behaviour has a cooldown parameter, Duration, to prevent players from spamming logic triggers. Use this when you want logic to stay active, but not be triggered excessively at once.

Common Uses

  • Send a message to another Object's Toggle Component to activate or deactivate its Behavior (e.g., Platform, Melee Enemy, etc) for a puzzle platformer

  • Apply to Assets such as info panels and trigger the NFT Details Display Component, open doors from a distance, etc.

  • Trigger lights and/or sound to turn on/off

  • Reset logic on a Multiplayer Experience

Communications

Inputs:

Player Interaction (Press E)

Outputs:

Send one message within a specified range

Parameters

OptionsDetails

Message to Send - set a Message to send when players press E and interact with this Object

Broadcast Range - set the distance the Message will reach This parameter is visualised with a yellow circle Gizmo that adjusts as you change the value.

Last updated

Logo

Copyright Β© 2012- 2023 The Sandbox. All Rights Reserved.