Use the
stop all soundsblock
Offline
Sounds are tricky to work with. If you want it to loop, you will most likely need a variable system to work with. Something I always do is:
when whatever to initiate sound happens set variable to 1 repeat until <variable = 0> play new sound until end endThen, when you want that sound to stop looping or switch to another sound:
when whatever happens to stop sound set variable to 0 stop all sounds //this is absolutely necessary after setting your variable. switch to new sound set variable to 1 //everything on this line and after is the same as first script. Same variable to switch sounds. repeat until <variable = 0> play new sound until end endHope I helped! (:
Offline
Are you using broadcasts for when the shop button is clicked?
Offline
Can you give is a link to your project? It's easier to see the problem if the scripts are available.
Offline
this is the link. http://scratch.mit.edu/projects/zizou98/2320070
There is no actual game yet because I want to put the music in first, to get something out of the way.
PLEASE HELP! THIS IS FOR A SCHOOL PROJECT!!!
And yes it is based on the works of HP lovecraft.
Offline
Although the variable idea is a good one, if you are using a forever loop, it will continue to play the song to it's end, and then switch. Or worse,play them both at the same time. What you can do, is send a broadcast every time you go to the menu, or bonus screen. Then have scripts that say, when i recieve menu, stop all sounds, play sound menu music until done. That way, the sounds actually stop. The only downside is it won't loop.
Offline