Mute

Get help using Construct 2

Post » Fri Nov 11, 2011 1:55 pm

I am adding a mute sounds and music option to my game and i was messing around with the audio mute and unmute options. I was wondering if there is an "easy" way to mute and unmute all sounds, i was thinking about putting all sounds in a group then deactivating the group. But it just seems like there would be a better way that i am missing. i tried searching the forums to no avail. Thanks in advance
B
15
S
1
G
2
Posts: 62
Reputation: 1,696

Post » Fri Nov 11, 2011 3:05 pm

The idea of the group is pretty good.
You can go also with a global variable that you would test before playing any sound.

For example
Press space
..Sub Evt: If Sound = 1 => Action play sound

The group might be a better solution, in the sense that all is gathered in a single place.
In the end, your choice concerning the implementation you prefer.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 7,000
Reputation: 57,795

Post » Fri Nov 11, 2011 3:12 pm

Thank you, i like the idea of the global var because i already have a lot of sounds in different groups and did not realize that there was not a mute all function heh. With the global var i could effect sounds over multiple layouts. that is a great idea, thanks Kyatric!
B
15
S
1
G
2
Posts: 62
Reputation: 1,696

Post » Sat Nov 12, 2011 11:44 pm

Hi, i dont know if it still helps you or some other one.

http://s1.directupload.net/file/d/2707/fg4m72hf_png.htm
B
2
G
1
Posts: 6
Reputation: 462

Post » Sun Nov 13, 2011 12:50 am

Yea i ended up using the global variable and setting it to 1 for sound and 0 for no sound, it was a great idea from kyatric. I had alot of sounds in a few different layouts and it allowed me to mute all the sounds without much trouble or having to rearrange
B
15
S
1
G
2
Posts: 62
Reputation: 1,696


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 25 guests