can someone teach me to load a saved state?

QbAnYtOQbAnYtO Member Posts: 523
edited November -1 in Working with GS (Mac)
say i'm in level 2, game ask me "u wanna save?" i press YES

i exit the game....

go back to the game. it asks me "continue" and "new game" but i hit conitnue, then it loads level 2....

how can i make this happen?! lol

Comments

  • beefy_clyrobeefy_clyro Member Posts: 5,394
    Create an attribute called Current Level.

    Then have a rule on your level that says;

    Change attribute game.level to 2 (or whatever level you're on)

    Save attribute game.level and give it a name of your choice.

    Now you will want to put a load attribute on your splash/menu screen.

    Load game.level with the name you gave it above.

    Then have a rule on your continue button that says;

    If touch is pressed and game.level = 1

    Change scene to level 1

    Otherwise

    If game.level = 2

    Change scene to level 2

    Etc etc

    Its best to just implement an auto-save like above without asking the user to save.

    This will only work if played once through, if you have say 50 levels, get to 30 and then decide to play level 2 again, it would set the current level at 2 and not 30.

    So you need to implement a current level and unlocked level. You'd need to tell it that if current level < than unlocked.level then just change scene.

    That should give you the guts of what you need to do
  • QbAnYtOQbAnYtO Member Posts: 523
    wow thats alot more simplified. i ALREADY did something SIMILIAR and prolly bymistake to what ur explaining to me but its not working. NOW i'm gonna try ur way
    i'm still a little confused tho...

    ok i tried it. worked REALLY WELL! thanks man u have NO idea how much this has helped me.... i still got another issue...time to post a new thread :(
  • QbAnYtOQbAnYtO Member Posts: 523
    hmm... what do i do with that "current level" atribute. u only mentioned it once.... :/

    i'm trying to figure out how i can apply it to other levels
  • QbAnYtOQbAnYtO Member Posts: 523
    nevermind i got it! thanks man!!!!! i just gotta remember to add that "change attribute to EACH level. thank you so much :)
  • beefy_clyrobeefy_clyro Member Posts: 5,394
Sign In or Register to comment.