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
33
S
8
G
1
Posts: 626
Reputation: 3,775

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
33
S
8
G
1
Posts: 626
Reputation: 3,775

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
Check out my games on Google Play:
BEAST ATTACK (1,000,000+ downloads!)
ZOMBIE BASH (Android) (Launched Feb 17)
ZOMBIE BASH (iOS) (Launched March 17)
B
54
S
18
G
2
Posts: 436
Reputation: 5,582

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,583


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 7 guests