Discuss Scratch

Svahil
New to Scratch
4 posts

Can you disable "play until done" for a backdrop change?

I'm making a video game for a school project, and I've been trying to get the music working- I've got it coded so when i press' start and it goes to the main menu, it starts to play on loop with the forever code. But I would like to change the music once you hit play, the code for changing the music works fine, but the menu music keeps playing until done every time. Is there a fix to this?
awesome-llama
Scratcher
1000+ posts

Can you disable "play until done" for a backdrop change?

You can stop it immediately with these blocks:

stop all sounds

stop [all v]

stop [other scripts in sprite v]

For preventing the sound from playing again, you also have a few options. You could use the above stop blocks to stop the forever loop or you could make use of these placed in the forever loop to pause it until the sound should be played again:

repeat until <>
play sound [music v] until done
end

forever
play sound [music v] until done
wait until <>
end


Svahil
New to Scratch
4 posts

Can you disable "play until done" for a backdrop change?

awesome-llama wrote:

You can stop it immediately with these blocks:

stop all sounds

stop [all v]

stop [other scripts in sprite v]

I have tried stopping it with those blocks, it keeps playing until donne
awesome-llama
Scratcher
1000+ posts

Can you disable "play until done" for a backdrop change?

Svahil wrote:

awesome-llama wrote:

You can stop it immediately with these blocks:

stop all sounds

stop [all v]

stop [other scripts in sprite v]
I have tried stopping it with those blocks, it keeps playing until donne

It shouldn't. I tested it in a blank project and works as I explained. Perhaps share the project you are working on with the scripts you tried to use?


Svahil
New to Scratch
4 posts

Can you disable "play until done" for a backdrop change?

https://scratch.mit.edu/projects/627669873
This is the project, it is in another language though

Last edited by Svahil (Jan. 17, 2022 13:53:24)

awesome-llama
Scratcher
1000+ posts

Can you disable "play until done" for a backdrop change?

Svahil wrote:

https://scratch.mit.edu/projects/627669873
This is the project, it is in another language though

This works (Bell2 sprite):

when backdrop switches to [Spaceship v]
... // the rest of the script
stop [other scripts in sprite v]


Svahil
New to Scratch
4 posts

Can you disable "play until done" for a backdrop change?

Thank you!

Powered by DjangoBB