How do I mute all sounds at the same time with one click?

Get help using Construct 2

Post » Fri May 16, 2014 3:09 am

Hello all, so yeah, I was wondering, how do I mute all the sounds in my game at the same time with one click? There doesn't seem to be a "mute all" option.

Thanks a lot,
guannstar (Fnord)
B
36
S
9
G
1
Posts: 629
Reputation: 3,956

Post » Fri May 16, 2014 3:57 am

You use the Set Silent option in the audio object. I'd like to encourage you to read the audio section of the manual.
B
75
S
23
G
3
Posts: 673
Reputation: 9,283

Post » Fri May 16, 2014 1:01 pm

Thanks, I'll do that.
B
36
S
9
G
1
Posts: 629
Reputation: 3,956

Post » Fri May 16, 2014 4:34 pm

There is a mute all option.
Try this:
https://www.scirra.com/images/articles/ ... .31.12.png
B
58
S
19
G
3
Posts: 445
Reputation: 6,300

Post » Fri May 16, 2014 9:44 pm

as a good practice to avoid any holes in your logic, I also highly recommend making a variable that tracks if sound is muted or not and using it as part of your conditions that play sounds. For example:

Condition:
On Player Collision with HorribleDeathTrap > Set Player Animation to "Death"
SubCondition: If Muted = false > Play Sound "Player Death"


Having a variable for Muted will help in those cases where you forget to mute or silence the sounds for some reason. When the player clicks the button that turns mute on or off, it should also set the variable Muted to true or false.
B
49
S
12
G
10
Posts: 1,833
Reputation: 14,603


Return to How do I....?

Who is online

Users browsing this forum: brunopalermo and 12 guests