[Solved] How to stop multiple sound channels at once ?!


Is there a way to stop multiple sound channels at once?
I’m using sounds in channel 0~2500 here and there.
I don’t want to do

Stop the sound of channel 0
Stop the sound of channel 15
Stop the sound of channel 156
Stop the sound of channel 1684

Can I do something like

Stop the sound of channel 0~2500


Stop the sound of channel “greater than 0”

Maybe using expressions?!
I tried to search but couldn’t find one for this.

(I can’t use ‘stop music and sound on startup’ in scene properties because I need the BGM to continue playing.)

Thank you!!

Can I ask what your project is and why you need so many channels? I don’t see a single simple action to stop everything. Maybe, you could put in a feature request. In the meantime, I can only think of using a repeat event with a variable for a counter. check if a sound on channel X is playing and if yes, stop channel X, increase X and repeat.

It would be more efficient to reduce the channel spread by reusing channels or tracking their range with variables. You could stop 1-50, 100-125 …It’s not something I would recommend doing too frequently or honestly not at all. But, if you need to do it then you need to do it.

I hope I’m wrong and there’s an easier way to do it.

1 Like

Oohhh!!! That is a brilliant idea! I gotta try that, thank you!

oh haha the channels are not all filled it is just spread wide.
I’m using it like
100~110 : character 1
111~120 : character 2
1000~1010 : monster 1
Something like this.
There are just lots of characters and monsters. haha I just wanted to organize them.

Thank you so much Keith! :blush: :blush: :pray: :pray:

1 Like

Ok, that’s less scary. If they are in fairly equal size blocks you could use 1 repeat with several stop the sound actions. You could add the variable to a starting value, like stop x, stop x+100…

1 Like

Got it! Thanks a lot!! :blush: :blush: :blush: :+1: :+1:

1 Like