Mute all sounds in game
Posted: Sun Jul 26, 2020 4:08 pm
Hi there!
So I'm making a game where I have made a table "gSounds" which has all the sounds required.
Now, I want to add a feature which mutes all the sounds in the game.
But if I do
then it raises an error.
I can individually set the volumes of all the sounds to zero but there are so many that I have used and it'll take a lot of time in doing so. So is there any short way in which I can achieve that?
Thanks for your help!
So I'm making a game where I have made a table "gSounds" which has all the sounds required.
Now, I want to add a feature which mutes all the sounds in the game.
But if I do
Code: Select all
gSounds:setVolume(0)
I can individually set the volumes of all the sounds to zero but there are so many that I have used and it'll take a lot of time in doing so. So is there any short way in which I can achieve that?
Thanks for your help!