Discuss Scratch

HectorVector245
Scratcher
40 posts

Loops.

I have been trying to make music play in the backgrounds of my games and play continually but if you go to a certain backdrop it stops and switches to a different song, I have been trying to use this script but it continues playing and just restarts the song.

whenclickedforeverplaysound?untildone

whenbackdropswitchesto?stopallsoundsforeverplaysound?untildone

When I leave out the forever loop it will work, but the problem is it will not repeat when finished.
MookyE
Scratcher
100+ posts

Loops.

Forever
If backdrop =1
Play sound1
Else
Play sound2

When backdrop is switched stop all sounds
HectorVector245
Scratcher
40 posts

Loops.

MookyE wrote:

Forever
If backdrop =1
Play sound1
Else
Play sound2

When backdrop is switched stop all sounds

Thank you so much, this helps a ton!
GrilledCheeseBurrito
Scratcher
1000+ posts

Loops.

whenclickedforeverifnotfoo=1thenplaysound?untildone

whenbackdropswitchesto?setfooto1stopallsoundsforeverplaysound?untildonewhenclickedsetfooto0

almost but yeah

Powered by DjangoBB