GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

How to create a Mute button ...

dkuriendkurien Posts: 7Member
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

  • tenrdrmertenrdrmer Posts: 9,934Member, Sous Chef, Senior Sous-Chef
    Accepted Answer
    Merged Threads. By report it I meant click the contact support link and actually report it to it so they will for sure know its there and can assign someone to investigate.

    It's not my fault I never learned to take responsibility for anything. ;)

Answers

  • shark1505shark1505 Posts: 75Member
    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 Posts: 7Member
    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 Posts: 10,383Member, Sous Chef
  • dkuriendkurien Posts: 7Member

    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 Posts: 5,548Member
    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 Posts: 158Member
    maybe this will help you, link to the template is in the description.
  • rhinokeyrhinokey Posts: 158Member
    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 Posts: 7Member
    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 Posts: 9,934Member, Sous Chef, Senior Sous-Chef



    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.

    It's not my fault I never learned to take responsibility for anything. ;)

  • dkuriendkurien Posts: 7Member
    edited August 2012
    tenrdrmer said:

    ---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 Posts: 7Member
    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 Posts: 158Member
    edited August 2012
    tenrdrmer said:


    ---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 Posts: 9,934Member, Sous Chef, Senior Sous-Chef
    @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.

    It's not my fault I never learned to take responsibility for anything. ;)

  • rhinokeyrhinokey Posts: 158Member
    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.
This discussion has been closed.