[SOLVED] Decreasing all existing and incoming audio's volume to half?

So I want to have an object decrease volume for all (save for one sound) sounds in the game, both ones currently playing and ones that might start playing, to half; in other words to have all audio in-game to play at half volume until this effect wears off. How to implement?
I tried having a controller-object do
GML:
audio_sound_gain(all,0.5,1)
in Step Event but it didnt work.
Thanks beforehand!
 

TsukaYuriko

☄️
Forum Staff
Moderator
all is for instances, not sounds. :)

Add all sounds that should be affected to an audio group, then use audio_group_set_gain.
If your existing audio group setup forbids this, add all sounds that should be affected to an array, then loop over the array and call audio_sound_gain on all of them.
 
all is for instances, not sounds. :)

Add all sounds that should be affected to an audio group, then use audio_group_set_gain.
If your existing audio group setup forbids this, add all sounds that should be affected to an array, then loop over the array and call audio_sound_gain on all of them.
Thanks for reply. Shouldve tested only with a single sound first, I wouldve noticed a difference... but I didnt know 'all' does not include sounds, thanks for this.
Problem solved!
 
Top