Help, slider problem.

liamoliamo Member Posts: 191
edited November -1 in Working with GS (Mac)
Can somebody give me the code for saving a sliders position after you leave the scene, all the attributes are global game attributes and the 2 sliders control Sound Effects and Music (different slider each) I've tried constraining but I can't get it right. when I move the sliders, leave the scene and come back they have reset themselves to their original positions. Please help, this is annoying.

Comments

  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    i would look over your rules, the game attributes wont reset when you leave the scene so there has to be something changing them to a initial position or something.

    if you haven't already check out fmg's slider demo

    http://gamesalad.com/game/1758
  • liamoliamo Member Posts: 191
    the code within my sliders are very dense, can i just have the code, i can't work it out, sorry, thanks heaps.
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    yes search the title of the demo i posted inside the gamesalad creator and you can open the project and see the code

    cheers
  • liamoliamo Member Posts: 191
    Sorry, i have already made my sliders, i just want to know how to make the slider stay where i slid it when i come back to the options scene from the menu. Thanks.
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    The only way to save the position is to save and then load the right attributes. For us to help you we have to know how you are doing things. So really you need to post your code and hope someone can make heads or tails of it from pictures.

    And I can promise you the "Please can I just have the code instead of being pointed in the right direction to help myself learn" type comments will for sure put many people off from being willing to offer you any help. You must be willing to help yourself before others will be willing to help you.
  • liamoliamo Member Posts: 191
    sorry tendrmer, here is a video showing the problem.

    http://www.youtube.com/user/ColeyInc?feature=mhee
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    Search for Pause Menu Demo under new in GameSalad. That is a modified version of what john posted earlier that will show you how I have setup a volume slider system that does what your asking. saves the position of the slider so when you come back its in the same spot. I don't know how you have coded your sliders so I don't know for sure if this demo will work for your method but this should help you see how to save their positions.

    good luck Hope it helps.
Sign In or Register to comment.