Mute On/Off button help

PixelGamingPixelGaming Member, PRO Posts: 19

So first time posting and still learning the kinks on the software. I created a mute button, the button mutes the music but the starts the game. The game we are creating is a flappy bird type of game, so when you press the screen the game starts. Now if someone wanted to mute the music, they would press the mute button but I don't want the game to start.

How can we create the button without it colliding with the other actions.

thank you

Comments

  • ToqueToque Member Posts: 1,188

    Most people make a separate mute button and play button........
    You could make the play button so it doesn't overly the play button..

    I don't know how overlapping buttons could work without triggering both.

  • IceboxIcebox Member Posts: 1,485

    You can create a boolean game attribute , call it mute

    in your mute button
    if touch is pressed
    pause music
    change attribute game.mute to true
    otherwise
    change attribute game.mute to false

    on the screen touch rule to change scene add if game.mute is false , and mouse button is down - change scene

  • ToqueToque Member Posts: 1,188

    @Icebox said:
    You can create a boolean game attribute , call it mute

    in your mute button
    if touch is pressed
    pause music
    change attribute game.mute to true
    otherwise
    change attribute game.mute to false

    on the screen touch rule to change scene add if game.mute is false , and mouse button is down - change scene

    Good stuff IceBox. But........
    Turning the mute off? Or Unpausing?
    You can only play game if mute is false?

  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,880

    @andrew9662
    Perhaps this example will be useful:

  • PixelGamingPixelGaming Member, PRO Posts: 19

    Yes so i got it work, if it's pressed it mutes the music, if pressed again it plays the music. The issue is I want to press the mute button without it starting the game or while I'm playing the game, since the way the game starts is by pressing the screen. I hope I am making sense lol

    Basically make the button not trigger any other actions but its own action which is to mute/play music

  • ToqueToque Member Posts: 1,188

    This is how I would do it.......I would use two buttons.

    https://www.dropbox.com/s/84g8ued6ij7elyd/Two button system.zip?dl=0

  • SocksSocks London, UK.Member Posts: 12,822

    @Toque said:
    This is how I would do it.......I would use two buttons.

    https://www.dropbox.com/s/84g8ued6ij7elyd/Two button system.zip?dl=0

    Attached is an even simpler 1 button way to do it . . .

  • ToqueToque Member Posts: 1,188

    @Socks said:

    Touch outside. Duh......

    Check and mate. Well played.

  • PixelGamingPixelGaming Member, PRO Posts: 19

    thanks for all the help dudes

Sign In or Register to comment.