🔟Play Sound
Last updated
Last updated
Copyright ©The Sandbox. All Rights Reserved.
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.
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)
Inputs: Play On Start or when message is received.
Outputs: Plays sound and sends a message.
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.
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.
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!
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.
Clicking the field opens a pop up with a selection of sounds you can choose from.At the moment you aren’t able to upload custom sounds.
This variables maximum range is defined by the Magic Gem.By default, it has a range between 0- 4
Play On Start Play - Play on Start will make trigger the Component to play the selected sound when the experience starts.Play On Receive Message - This option lets you define a message the Component will 'listen for' that will trigger the sound to play.Play on Players Interact - Will trigger when a player presses 'E' on the object with the component added to it.
Setting a sound to 'Loop' by choosing 'True' means that the sound will keep playing once triggered. If you leave the loop toggled to 'False', then the sound or piece of music will only play once the whole way through.
If set to 'True' the Sound Component will display two more drop-down options.Message to Stop - Will turn the track completely off. This means if the sound is started again it will play from the beginning.Message to Pause - Will stop the sound wherever it has gotten up to, and if the sound is triggered to play again, it will start from where its playthrough was interrupted.