GameSalad

Mute On/Off button help

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 Posts: 784

    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 Posts: 1,243

    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 Posts: 784

    @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 Posts: 2,688

    @andrew9662
    Perhaps this example will be useful:

  • PixelGamingPixelGaming Posts: 18

    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 Posts: 784

    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.Posts: 12,453

    @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 Posts: 784

    @Socks said:

    Touch outside. Duh......

    Check and mate. Well played.

  • PixelGamingPixelGaming Posts: 18

    thanks for all the help dudes

Sign In or Register to comment.