Discuss Scratch

CJShintastic
Scratcher
8 posts

SOUNDS ARE BREAKING!

hey scratch team, can you fix this bug? pls pls pls if i do forever play {this sound} until done, then it keeps going UHFIGUWEFGYHIUESFWIUFREWSUIERDFSUIDESFUJDEFAEFRSWIOEADIKUASDEHJASDEGHHJUI please fix this bug







D:
Epicness123
Scratcher
1000+ posts

SOUNDS ARE BREAKING!

This is not a bug- this is intended behavior.

The “play sound until done” block will play a sound and then wait until it's done playing before the script continues.
You put a forever loop around it, meaning that it'll infinitely loop the sound.

If you want the sound to just play once, remove the forever loop.

Last edited by Epicness123 (April 27, 2025 22:17:13)

CJShintastic
Scratcher
8 posts

SOUNDS ARE BREAKING!

yeah but if i put a forever loop around it, it sounds like a cat stepped on my keyboard and i have to put a wait {the amount of seconds the song is} then broadcast the message the song gets played by to play it forever
HighlaneGamingStudio
Scratcher
500+ posts

SOUNDS ARE BREAKING!

CJShintastic wrote:

yeah but if i put a forever loop around it, it sounds like a cat stepped on my keyboard and i have to put a wait {the amount of seconds the song is} then broadcast the message the song gets played by to play it forever
I think you're mixing up these two blocks:
play sound (sound v)

play sound (sound v) until done
The first is supposed to have the BZP-ZP-ZP-ZP-ZP-ZP effect when placed in a forever loop. It functions by starting a sound and continuing on with the rest of the code- in the case of the forever loop, it starts the sound again, so you're hearing the first split second (1/30 of a second, to be exact) of the sound over and over again. The second block has the wait block you were talking about built in. It starts the sound and then waits until it is over to continue the script.

In other words, use the second block to solve your problem.

Edit- Noticed you mentioned a using broadcast block. If you can find a way to avoid using the broadcast, my solution will work. If you can share the project that has this issue and add a link to it in this post, we can figure out exactly what to fix.

Also, since this seems to be more of a project problem than a Scratch problem, I'm reporting this to be moved to Help with Scripts.

Last edited by HighlaneGamingStudio (April 27, 2025 23:52:35)

LittleGreyCells
Scratch Team
1000+ posts

SOUNDS ARE BREAKING!

Moved to Help With Scripts
vdiaz041
Scratcher
500+ posts

SOUNDS ARE BREAKING!

spectre_specs wrote:

Moved to Help With Scripts
hello scratch team moderator
vdiaz041
Scratcher
500+ posts

SOUNDS ARE BREAKING!

Epicness123 wrote:

This is not a bug- this is intended behavior.

The “play sound until done” block will play a sound and then wait until it's done playing before the script continues.
You put a forever loop around it, meaning that it'll infinitely loop the sound.

If you want the sound to just play once, remove the forever loop.
forever
play sound (sound v) until done // like this
end

Powered by DjangoBB