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
45
S
11
G
1
Posts: 650
Reputation: 4,423

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
76
S
23
G
3
Posts: 673
Reputation: 9,338

Post » Fri May 16, 2014 1:01 pm

Thanks, I'll do that.
B
45
S
11
G
1
Posts: 650
Reputation: 4,423

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
Football Dash: GooglePlay | AppStore

Zombie Bash: GooglePlay | AppStore

Kunkong: GooglePlay
B
64
S
22
G
3
Posts: 450
Reputation: 6,764

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: Bootfit and 7 guests