(Redirected from Play Sound () (block))
|Start Sound ()|
The Start Sound () block is a Sound block and a Stack block. The block will play the specified sound without holding up its script (unlike the Play Sound () Until Done block, which will pause its script until the sound has finished playing).
This block was previously named "Play Sound ()" before the release of Scratch 3.0.
As this block plays a sound without a delay in its script, it is mainly used when a sound must be played without bothering its script.
Some common uses for the Start Sound () block:
- Playing a sound effect with an action
when gf clicked start sound [meow v] say [Hello!] for (1) secs start sound [meow v] say [Bye!] for (1) secs
- If a sprite has achieved a goal, a sound effect is played
when gf clicked forever move (10) steps if <touching [edge v]?> then start sound [Victory v] if on edge, bounce
- Enhancing an event
when gf clicked forever if <touching [snowball v]?> then start sound [collide v] wait until <not <touching [snowball v]?>>
- Main article: List of Block Workarounds
The only other block that can play one of the pre-recorded sounds is the Play Sound () Until Done block. This block, however, waits the length of the sound before continuing to the block below it so it has to be used with a broadcast or variable-based trigger before it in order to continue the script.
. . . broadcast [continue script v] play sound [meow v] until done when I receive [continue script v] . . .
- If a sound is playing and you play the same sound again, the sound will be cut off, but will play from the start again.
- This does not happen if a different sound is played when a sound is currently playing.