How to make sound mute, for many layouts

Get help using Construct 2

Post » Wed Nov 28, 2012 9:26 am

first, Sorry for my English.
I have a layout, 2 event sheet. Main event sheet contains main variable and actions, last sheet linked to Options layout. I will add layouts, which include Main event sheet, with sheet, again.

Then Main event sheet have one global variable named SoundOnNOff, that contain the number 0-sound off or 1-sound on.
the Options layout have a mute button, and if clicked toggle silence and save to 0 or 1 to SoundOnNOff.


it makes on or off animation.



it able to continue if button is visible and clicked,
if(SoundOnNOff== 0);SoundOnNOff=1,
    default animation of MIOptionsSound play, and not silent/toggle/
if(SoundOnNOff==1); SoundOnNOff=0;
    defaultmute animation of MIOptionsSound play, and silent/toggle/

But it mute button doesn't work


When there is no if(SoundOnNOff== 0) or if(SoundOnNOff== 1) condition, on debug:
First I set the sound off, then switch layout to other layout which is for play the game, and /once debug, no exit/ again switch to back options layout then mutebutton animation is on/default animation/. and then click the mutebutton, defaultmute animation showed and play only fx/sounds effects/, but main music isn't playing.

How can I fix this?
B
11
S
3
G
4
Posts: 22
Reputation: 2,794

Post » Wed Nov 28, 2012 9:27 am

First image
http://www.flickr.com/photos/seggo0227/8225666805/
Second image
http://www.flickr.com/photos/seggo0227/8225666869/
B
11
S
3
G
4
Posts: 22
Reputation: 2,794

Post » Thu Nov 29, 2012 10:53 am

http://partners.mn/mute.rar here is the capx file
B
11
S
3
G
4
Posts: 22
Reputation: 2,794


Return to How do I....?

Who is online

Users browsing this forum: gregorysforster, jeffige, Matthew de, onzephyr, Yahoo [Bot] and 0 guests