Saving and Loading problems
Hello
I am having a problem with loading my integers. I have 3 scenes and they all have the same point system. When actor collides with a coin it give 15 points to game.overallscore So say I got 1200 points in my game.overallscore. I then when game.levelcomplete is true I will make a rule stateing If game.overallscore is >(greater than or equal to) game.levelonehighscore then change attribute to game.levelonehighscore to game.overallscore. So now game.levelonehighscore has 1200 . I do this too all my 3 scenes. so its game.levelonescore , game.leveltwohighscore and game.level3highscore. They all in each of their scene take from game.overallscore. (of course I reset overallscore in eachscene so they dont get double points) I have a menu and they have custom numbers (I got it from a tutorial of T-shirtbooth) And they all represent each levels highscore. Like for levelone the score being displayed is from game.levelonehighscore and all of that works. Every last code I made. BUT here is my problem. When I save the attribute. Levelonehighscore. and leveltwohighscore and so on in there own scene. It seems when I load them (I got the loading tutorial from T-shirtbooth) They integers are all messed up some dont load and some just copy from the other level and make it their score instead. So I have level one have 1200 score and then Leveltwo copys that and makes it 1200 also. I dont get it. In the level for level one two and three. At the end of each level I put this rule up. for example for level one. I have (rule) When game.Levelonecomplete is true then (rule) if game.overallscore is (greater or equal to ) game.levelonehighscore then (change attribute) game.levelonehighscore to game.overallscore(So now it equals the amount made in game.overallscore. Then I have a next level or a reset button. If they push next level it will save the attribute. so when touch is pressed save attribute game.levelonehighscore to (key) L1highscore.. Then when I go to load this bad boy (in the first scene. I load attribute and it dosent work. instead it goes all nuts on me (Note I am also loading the others too) When is following the same steps...if I only do level one then when I load it level one works but if I try to do two levels or three it mixes numbers up. Is this a game salad bug or am I doing somthing wrong here. Thank you please help.
I am having a problem with loading my integers. I have 3 scenes and they all have the same point system. When actor collides with a coin it give 15 points to game.overallscore So say I got 1200 points in my game.overallscore. I then when game.levelcomplete is true I will make a rule stateing If game.overallscore is >(greater than or equal to) game.levelonehighscore then change attribute to game.levelonehighscore to game.overallscore. So now game.levelonehighscore has 1200 . I do this too all my 3 scenes. so its game.levelonescore , game.leveltwohighscore and game.level3highscore. They all in each of their scene take from game.overallscore. (of course I reset overallscore in eachscene so they dont get double points) I have a menu and they have custom numbers (I got it from a tutorial of T-shirtbooth) And they all represent each levels highscore. Like for levelone the score being displayed is from game.levelonehighscore and all of that works. Every last code I made. BUT here is my problem. When I save the attribute. Levelonehighscore. and leveltwohighscore and so on in there own scene. It seems when I load them (I got the loading tutorial from T-shirtbooth) They integers are all messed up some dont load and some just copy from the other level and make it their score instead. So I have level one have 1200 score and then Leveltwo copys that and makes it 1200 also. I dont get it. In the level for level one two and three. At the end of each level I put this rule up. for example for level one. I have (rule) When game.Levelonecomplete is true then (rule) if game.overallscore is (greater or equal to ) game.levelonehighscore then (change attribute) game.levelonehighscore to game.overallscore(So now it equals the amount made in game.overallscore. Then I have a next level or a reset button. If they push next level it will save the attribute. so when touch is pressed save attribute game.levelonehighscore to (key) L1highscore.. Then when I go to load this bad boy (in the first scene. I load attribute and it dosent work. instead it goes all nuts on me (Note I am also loading the others too) When is following the same steps...if I only do level one then when I load it level one works but if I try to do two levels or three it mixes numbers up. Is this a game salad bug or am I doing somthing wrong here. Thank you please help.
Comments