How to make sound mute, for many layouts

0 favourites
  • 3 posts
From the Asset Store
Best soundtracks for any game. High quality and engaging assets.
  • 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.

    <img src="http://www.flickr/photos/seggo0227/8225666805/in/photostream" border="0" />

    it makes on or off animation.

    <img src="http://www.flickr/photos/seggo0227/8225666869/in/photostream" border="0" />

    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?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • partners.mn/mute.rar here is the capx file

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)