How to create a Mute button ...

dkuriendkurien Member Posts: 7
edited August 2012 in Working with GS (PC)
How do I create a mute button that will mute all sound ...

I am using Game Salad Creator for Windows. On pressing the Mute button, I'm trying to "Change Attribute":

set: game.Audio.Sound Volume
to: 0

but nothing seems to happen. It's driving me nuts, and I was wondering if anyone could help me.

Much appreciate it.
Denny (noob)

Best Answer

Answers

  • shark1505shark1505 Member Posts: 75
    Create a game integer attribute called gameMusic and give it the value of 1. Then use the expression editor for all of your play music/play sound and say volume = gameMusic.
    To mute, say that when someone touches the mute button:
    Change attribute: game.gameMusic to 0.
    This way all sound will shut off.
  • dkuriendkurien Member Posts: 7
    Hi shark1505 .. thanks for your advice on the mute-button. What's confusing me is how to set volume = gameMusic.

    Right now I have sound playing right at the beginning of the scene using the "Play Sound" action:

    play sound: thunder.ogg
    at volume: 1
    at pitch: 1
    run to completion

    Where and how should I set the expression 'volume = gameMusic' ?

    Appreciate your help.

    Thanks,
    Denny
  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
  • dkuriendkurien Member Posts: 7
    Changing the game.device.audio volume to 0 should mute it.
    I tried it - it still doesn't seem to work .. at least not on the Windows version of GameSalad Creator.

    I got my sound playing at the beginning of the scene using the "Play Sound" action:

    play sound: thunder.ogg
    at volume: 1
    at pitch: 1
    run to completion

    Then I have a button, which once "touched" I ask it to change attribute:

    set: Game.Audio.Sound.Volume
    to: 0

    ... nothing happens

    :-S
  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772
    You could also make an attribute that controls the sound so if it is true the sound plays and if it's false the sound does not play. Something like this:

    Create an attribute called playSound.

    This can be controlled by a button on your setting screen or whatever that toggles the playSound attribute to true/false.

    Then whenver you want to play a sound make a behavior that says:

    When your event occurs
    If playSound is true
    playsound thunder.ogg

    Jamie
  • rhinokeyrhinokey Member Posts: 158
    maybe this will help you, link to the template is in the description.
  • rhinokeyrhinokey Member Posts: 158
    edited August 2012
    tho warning, i started doing this on the windows version, which i found to be missing a lot of features, i went an purchased myself a mac mini

    also a chance the template wont even work on your windows gamesalad.
  • dkuriendkurien Member Posts: 7
    I think there's some kind of bug in the Window's version of Game Salad Creator. Even the above template doesn't seem to work on preview .. I guess I'll just have to buy a MAC :((
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934



    the windows version works fine as far as I have seen. if you think you have found a bug send a report in. OTherwise unless you just want a mac like the rest of us you dont need to go buy a mac just to use gamesalad.
  • dkuriendkurien Member Posts: 7
    edited August 2012
    ---video---
    the windows version works fine as far as I have seen. if you think you have found a bug send a report in. OTherwise unless you just want a mac like the rest of us you dont need to go buy a mac just to use gamesalad.
    There's definitely something wrong with the Windows version of Game Salad Creator - at least when it comes to muting the Audio-Sound-voume. Muting Audio-Music-volume seem to work fine .. how do I report this ?

  • dkuriendkurien Member Posts: 7
    edited August 2012
    Here seem to be a bug in the Window's version of Game Salad Creator. I can mute music volume but I can not mute sound volume. Please look into this
  • rhinokeyrhinokey Member Posts: 158
    edited August 2012

    ---video---
    the windows version works fine as far as I have seen. if you think you have found a bug send a report in. OTherwise unless you just want a mac like the rest of us you dont need to go buy a mac just to use gamesalad.
    unless you ever want to release a game on iphone or ipad.
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    @rhinokey that maybe so but don't go blaming an issue with the windows creator on your reasoning to buy a mac. if that were the case you should have bought a mac 3 years ago when GameSalad came out.
  • rhinokeyrhinokey Member Posts: 158
    edited August 2012
    @tenrdrmer
    except i didnt care about buying game salad 3 years ago? i heard about it recently after getting my first ipad, tried it, found a lot of the tutorials didnt translate well and the templates often had problems in windows, and i couldnt do iphone games with it so i bought a mac. i dont know why this is offending you so much. the windows version didnt have the expresion editor, which is a feature i thought was nice. and a lot of the templates didnt work with it.

    i have a job and make money so i bought a mac, and poof i had the stuff i wanted.

    I'm in no way hating on pcs, my day job is as a game artist and in general the majority of game dev is all pc based

    i apologize if somehow i've offended you by prefering gamesalad on mac. it is the only thing i use the mac for.
Sign In or Register to comment.