How do I mute sounds only

0 favourites
  • 5 posts
From the Asset Store
75 explosion sound effects. Essential for many games, Explosions Sounds contains a mix of explosion and impact sounds.
  • Hi,

    I have a problem muting sound effects. The problem is that I have sound effects and music, that need to be muted separately. I can do this with tags, by applying "sound" tag to all sounds and "music" to all music. But when I need to stop sound from playing, its impossible, as there are no multi tags allowed. Is there a way to mute sounds only without tagging them?

  • You can create a function "muteMusic" in which you put actions to mute all your music tags. They simply use the function as one line of code to mute many different sound/music files.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thank you, but either I dont understand the functions or you my problem. I need to mute music, I need to mute sound, I need certain sound stop playing, lets say "waterfall". This sound is already has a tag "sound", which mutes all sounds in game, including "waterfall" sound. When this sound is not muted and playing, I need it to stop under certain condition. I cant use Audio>Stop"tag" as it will stop all sounds with the tag "sound". And I cant use a second tag for "waterfall" sound.

  • If you need both possibility, to stop/play particular sound and stop/play some groups of sounds then you need to tag each file distinctly (each sound should have unique tag/name). With this you are allowed to stop/play a particular sound.

    Now to be able to manipulate groups of sounds I would create a function in which you can put actions to stop them playing one by one. For example

    Function On "stopMusic" => Audio Stop "sound_1"

    Audio Stop "sound_2"

    Audio Stop "sound_3"

    Audio Stop "sound_X"

    Or if you name it with some assumed format like above "sound_x", then you may want to do some more clever thing like:

    System -> For "stopMusicLoop" from 1 to maxMusicIndex => Audio Stop "sound_" & loopindex

    So I would suggest something like this. There is no way in C2 to stop/play music and sounds separately.

  • Thank you for suggestion! Seems like that should work! Ill try that tonight.

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