Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » SOUNDS ARE BREAKING!
- 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:
if i do forever play {this sound} until done, then it keeps going UHFIGUWEFGYHIUESFWIUFREWSUIERDFSUIDESFUJDEFAEFRSWIOEADIKUASDEHJASDEGHHJUI please fix this bugD:
- 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.
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!
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 foreverI think you're mixing up these two blocks:
play sound (sound v)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.
play sound (sound v) until done
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)
- vdiaz041
-
Scratcher
500+ posts
SOUNDS ARE BREAKING!
Moved to Help With Scriptshello scratch team moderator
- vdiaz041
-
Scratcher
500+ 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.
forever
play sound (sound v) until done // like this
end
- Discussion Forums
- » Help with Scripts
-
» SOUNDS ARE BREAKING!
