I have a game in which I want a continuous music loop, say HipHop, to repeat and keep playing until near the end of the game. In the Stage or Sprite script I build a Forever Loop around Play Sound HipHop Until Done. That works. However, at the end of game I want that sound loop to quit so I can play another sound, say a meow. I tried putting in Stop all Sounds in my script but that doesn't stop the HipHop. Seems Stop all Sounds doesn't Stop all Sounds in all scripts including the stage. Suggestions/insight? Thanks
Offline
You'll need to use a variable.
Insert this script:
when gf clicked set [play v] to [1] forever if <(play) = [1]> play sound [HipHop v] until done end endNow, to stop it, and play Meow, use this script:
set [play v] to [0] stop all sounds play sound [Meow v]Or, if you want it to LOOP meow, do this:
when gf clicked set [play v] to [1] forever if <(play) = [1]> play sound [HipHop v] until done else play sound [Meow v] until done end endTo switch:
set [play v] to [0] stop all soundsI hope you get the picture...
Last edited by SciTecCf (2012-06-24 11:24:51)
Offline
SciTecCf wrote:
You'll need to use a variable.
...
To switch:set [play v] to [0] stop all soundsI hope you get the picture...
Your last script is wrong (see the red block?). The correct one is:
set [play v] to [0] stop all pinks(Lol?)
Offline
Molybdenum wrote:
SciTecCf wrote:
You'll need to use a variable.
...
To switch:set [play v] to [0] stop all soundsI hope you get the picture...Your last script is wrong (see the red block?). The correct one is:
set [play v] to [0] stop all pinks(Lol?)
That is weird.
Offline
Thanks SciTecCf. Your suggestion worked.
I don't understand Molybdenum's suggestion of after set play to 0 the "stop all pinks"
Where does one find the instruction "stop all pinks"?
Thanks to you both for your prompt replies.
Offline
Offline