Save attribute problem

GuaveMediaGuaveMedia Member, PRO Posts: 1,262
edited December 2011 in Working with GS (Mac)
Hey,

when finishing each level, the boolean finish is true.
And when finish is true, I change the attribute levels(integer) to 1 at level1,
to 2 at level2 and so on..
So I have a rule: when finish is true,
change attribute
save attribute

I have this rule in each level...In my main menu I have: when level select button
is pressed load attribute ( key etc. is alright). In my levels I have, when attribute = 2 touch is pressed
change to scene 2 etc. But somehow I only can choose the last level finished?

Why that? Something wrong with save/load attribute?

thx for help

Comments

  • GuaveMediaGuaveMedia Member, PRO Posts: 1,262
    Sry I set the attribute levels each time to levels +1
  • GuaveMediaGuaveMedia Member, PRO Posts: 1,262
    as mentioned above, I did that :/
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    edited December 2011
    2 things.

    First off you shouldnt have your load attributes when touch is pressed. You should have the load behavior by itself in your first scene so it loads as soon as the game starts.

    Second, in your menu where you select the levels the way you have it set up will do exactly what your experiencing. It will only allow you to load the last level beat. It shouldnt be when attribute=1 and touch is pressed change level to 1. Because that will only let you select the first level when you only have the first level beat, and once you beat the other levels and that attribute is greater then 1it wont work because that attribute is no longer 1. It should be when attribute is greater then or equal to 1. When attribute is greater then or equal to 2 and so on.
Sign In or Register to comment.