[Solved] How do I make a button to turn on and off sound

0 favourites
  • 13 posts
From the Asset Store
Grenade Sound Library
$3.20 USD
60% off
Grenade Sound Library contains: 135 sounds 50 grenade sounds and 85 surface sounds
  • I'm using this logic

    If touch on setting and togglesound is 1, turn off music, set togglesound 0

    If touch on setting and togglesound is 0, turn on music, set togglesound 1

    But, it's not working, whenever I touch the button it simply loop the sound to start

    Any help?

    ---

    edit

    Nevermind, found toggle silent function

  • You also need to add logic to any event that would play sound to check the value of togglesound and only play if togglesound is 0

  • Ah, you found an answer, can you then mark this topic (the subject of this thread) with the [Resolved] that way people don't keep coming in to answer.

  • As notified on manual audio stop "" can stop a sound BUT doesn't work or wrong used.

    Using an onclicked button with a Audio Play "sample_name" and a simple button (onclicked) - Audio Stop "sample_name" then ... nothing the sound is still playing with or not preload

    any one have a clue about this or the audio stop nothing but the last sound ?

  • [solved]

    when using Play action "sound_sample" you need to set the Tag there then this tag will be used later to stop the correct sound.

    as

    Audio | Play "sound_sample" not looping at volume 0 dB (tag "sound_01")

  • Ah, you found an answer, can you then mark this topic (the subject of this thread) with the [Resolved] that way people don't keep coming in to answer.

    We must do it manually?

    Like add [resolved] on the title?

    [solved]

    when using Play action "sound_sample" you need to set the Tag there then this tag will be used later to stop the correct sound.

    as

    Audio | Play "sound_sample" not looping at volume 0 dB (tag "sound_01")

    Glad you found it

  • ijoin Yes, you just edit the post and change the subject. It can't do it automatically, how would a web site know that your problem was resolved?

  • ijoin Yes, you just edit the post and change the subject. It can't do it automatically, how would a web site know that your problem was resolved?

    I mean like a button to mark question solved

    BTW, BluePhaze, can you help me with the sound toggle not working on cocoon js ported android app?

    I've already made another thread about this, but so far found no solution

  • I will take a look, at work now though so can't spend too much time on the site

  • I will take a look, at work now though so can't spend too much time on the site

    Thanks pal !

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hey there, sorry didn't get to take a look last night (in the process of selling my house). Will try tonight if I can get time.

  • Hey there, sorry didn't get to take a look last night (in the process of selling my house). Will try tonight if I can get time.

    Take your time

  • Hey How's it going? I have a question... I had the same problem; the "set silent" function didn't work on my mobile phone? Also, is setting it to "set toggle silent" instead, the way to fix the problem?

    Thanks,

    guannstar

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