πŸ”ŸPlay Sound

GAME MAKER 0.9 ENHANCEMENT

New preview button in Editor mode so there's no need to test in play mode as before.

Build Singleplayer & Multiplayer Logic - about [SP] or [MP] behaviours or components

Play a sound effect, ambient sound, or music globally or locally.

Common Uses

  • Plays sounds when a message is received.

  • Play sound when picking something up or placing down an asset.

  • Play when starting or completing a quest.

  • Play music meant for a location when players enter (using Trigger Volume or Speaker components to detect player location)

Communications

Inputs: Play On Start or when message is received.

Outputs: Plays sound and sends a message.

Parameters

OptionsDetails

Sound To Play - Select the sound to play.

Is Looping - Should the sound loop.

Volume (slider) - Set the volume of the sound.

Is 3D Sound - Toggle 3D sound.

Play Condition - When should the sound start playing. Play On Start - Play the sound when the game begins. Play On Receive Message - Play the sound when a message is received.

Is Interruptible - Can the sound be stopped or paused.

Message To Send - Defines the message to send when the sound stops playing.

Broadcast Type - Defines the broadcast method. Everyone In Range - Send message to everyone in range. Specific Tags In Range - Send message to a tag. Selected Actor - Send message to a particular asset.

Broadcast Duration - Defines the type of duration. Once - Send only one time per message received. Duration - set amount of time in seconds and delay between broadcasts. Forever - broadcast forever with a delay between broadcasts.

Default Settings

Sound to Play

Sound Range

Play Condition

Edit Logic

Loop

3D Sound

2D Sound will play the chosen sound at the same volume regardless of distance or the orientation of the player.3D Sound will change volume based on the distance the Avatar is to the Object with the Play Sound Component.The sound will also be audible based on the location of the player. This means that if a player is standing to the right of the object emitting the sound, they'll hear the sound louder in the left headphone or speaker as though the sound is coming from that direction.

Message Interuptable

Use Case Example

You could use a Speaker component to identify when an Avatar is close by, which could send a message to play a sound or some music that indicates a battle has started, or a clue may be nearby!

Toggle Tip!

Use the Door Behaviour as a switch.In this example, we have a radio with the Door Behaviour applied.The 'Message to Open' is set to 'Radio.On.'The 'Message to Close' is set to 'Radio.Off.'The Play Sound Component is added to an Object above the radio and switched to invisible.The 'Play On Receive Message' is then set to 'Radio.On'The Interuptable 'Message to Pause' is set to 'Radio.Off'.With this set up the sound isn't actually coming from the radio, but it does now control the messages that trigger the Play Sound Component.

Last updated

Logo

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