Discuss Scratch

Rainbowboi85
New Scratcher
1 post

Changing Background Music

Hey yo,

Is there a way to make the music change. I am trying to make it where there is different music for the game and death screen.

I attempted
when backdrop switches to [ v]
stop all sounds
forever
play sound [ v] until done
end

However this has not been working. Any help would be appreciated. Thanks!
Ranger_07
Scratcher
100+ posts

Changing Background Music

Try adding a “stop other scripts in sprite” block before the “stop all sounds” block?
planeboi1010
Scratcher
11 posts

Changing Background Music

Maybe swap the forever loop with a “repeat until” and have a variable that controls what song you want on. It may look something like this:
when backdrop switches to [ v]
repeat until <(song) = [1]>
play sound [ v] until done
end
So the script plays the sound until you switch the “song” variable. Then add another script like this, but just with a different song, and of course switching the variable around.
Hope this helps.

Powered by DjangoBB