Saving music settings... help!

thelogobarthelogobar Member Posts: 93
edited May 2012 in Working with GS (Mac)
Hope someone can help, I'm going around in circles here. Not far from completing my first (simple) game. I'd like the user to be able to turn music on and off, got that sorted. But for that setting to also be saved so next time they play the music is still off if that's what they chose.

So the game has a start screen which has the play music actor, ace the music starts playing. It also has a load attribute for music and sound.

The options scene has a music on/off button with the rules below, they basically turn the volume on and off. Also the scene has a save music and sound attribute actor.

image

So the game starts, music is playing. You go to options and turn music off, great it stops playing, but then you go back to the start screen and its playing again. Fine so you go back to the options scene but the music is still off, without pressing the music on off button you go back to the start scene and the music has stopped.

I have the same controls on the pause screen. I just can't get the music volume setting to save or stay the same once you go to the start screen.

Hope my ramblings make sense, has anyone managed to make an options screen that remembers the users settings for music and sound?

Best Answers

Answers

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    You need to use the save attribute and save the off or on position every time it is changed and then load that attribute before the options menu loads.
  • thelogobarthelogobar Member Posts: 93
    So would you put the save attribute in the on/off button itself?
  • thelogobarthelogobar Member Posts: 93
    I spent most of the day on this and it's sent me dizzy.
    It should be straightforward, set the music volume and save that choice. But it just isn't working for me. Would anyone be willing to have a look at my game to see where I'm going wrong with this?
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    You need to create an attribute music volume and have it mirror the current volume setting, then save that attribute and when the game loads have that attribute change the game volume level. Just remember device level attributes do not save without out you creating an attribute of your own to mirror it and save it and then have it modify the device.
  • thelogobarthelogobar Member Posts: 93
    edited May 2012
    Thanks for the help, it sounds like that should work but I'm having no joy at all. Is this something other people do easily? I would have thought saving the volume settings would be a standard option to include in my game.
    It would be nice to give them the option of playing without music, but with sounds on. Then having the game save that setting for next time they play.
  • thelogobarthelogobar Member Posts: 93
    @tshirtbooth, I sent you an email from your website last week regarding this. Wondered if you'd had a chance to read it at all?
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    Maybe this will help. The rest of the series is on my YouTube page



  • thelogobarthelogobar Member Posts: 93
    @fryingbaconstudios Thanks, I'll have a look at that when I get out of the office and I can view YouTube.

    @tshirtbooth, I must have just sent it as you were updating the site. I sent the email to sales@tshirtbooth.com. I'll resend to the mail you listed, thanks.
  • thelogobarthelogobar Member Posts: 93
    @tatiang Think I'm being dim, where is the PM option?
  • thelogobarthelogobar Member Posts: 93
    @tatiang thanks for your advice, I cleared out all my settings regarding sound and music then started from scratch. It's now working splendidly.

    Thanks everyone for
Sign In or Register to comment.