Plays a sound effect with optional volume and pitch inputs and outputs the channel the sound is played on.

Play Sound
Play Sound.png
TypeScript block
ColliderNone
FolderSound
Ports
Inputs Before
Volume
Pitch
Outputs Channel
After

Notes

  • The volume ranges from 0 to 1 (inclusive). Any value exceeding this range is clipped.
  • Similarly, Pitch ranges from 0 to 4 (inclusive).
  • When all channels are occupied or sounds are turned off in Fancade settings, this block outputs -1. Otherwise, it outputs a non-negative integer where the sound is occupied from 0 to 9 (inclusive). Used in conjunction with Volume Pitch.
  • Unlike most other blocks, a wire connected to Before is required for it to do anything, it does not run automatically.
  •  
The rightmost setting displays which sound effect is played. Tap to change.
  • Checking Loop will make the sound repeat on the chosen channel until stopped with Stop Sound.
  • A looping channel becomes occupied until it is stopped, meaning other Play Sound blocks will not choose that channel.

Related