help! load attribute can't work
here is detail:
three scenes: 1menu 2game 3 score show ;
two attributes : 1 mainscore int 2 sascore int
1 in scene 2 named "game",game's score is 300(mainscore=300), so in scene3, I drop a actor named "s" in scene(change attribute: game.mainscore to sascore; save attribute: attribute :sascore key:sa)
2 then in scene1 named "menu", I drop a actor named "loading" in scene(load attribute: key sa attribute:sascore)
3 preview:Now game over, I get a score is 300, then I turn to menu,and enter scene3 , it's success,can display the score 300.
4 all action look like correct, but when I use iOS viewer to test if load attribute is really work, it fail
(preview on iphone--play and get 500 score,then return to menu,and enter in score scene,it succeed, can display 500. and then exit the iOS view software and enter again choose recent--my game, when it starts again,I try to enter to scene3 scoreshow, it displays 0. not the last score 500)
this is my action, where is the incorrect action ?
three scenes: 1menu 2game 3 score show ;
two attributes : 1 mainscore int 2 sascore int
1 in scene 2 named "game",game's score is 300(mainscore=300), so in scene3, I drop a actor named "s" in scene(change attribute: game.mainscore to sascore; save attribute: attribute :sascore key:sa)
2 then in scene1 named "menu", I drop a actor named "loading" in scene(load attribute: key sa attribute:sascore)
3 preview:Now game over, I get a score is 300, then I turn to menu,and enter scene3 , it's success,can display the score 300.
4 all action look like correct, but when I use iOS viewer to test if load attribute is really work, it fail
(preview on iphone--play and get 500 score,then return to menu,and enter in score scene,it succeed, can display 500. and then exit the iOS view software and enter again choose recent--my game, when it starts again,I try to enter to scene3 scoreshow, it displays 0. not the last score 500)
this is my action, where is the incorrect action ?
Answers
I believe that you need to have an ad hoc of your game on your phone for the save and load attributes to function correctly.
Jack McGraw
Make sure that the keys for the save and load are the same and that you don't enter it in to the expresion editor, that it is typed in the text box. If it's typed in the expression editor, open the expression editor and click remove expression.
Ace
Ace
Ace
I'm thinking that maybe it was the fact that the key had been entered in the expression editor instead of straight in to the box (the expression editor is useless in the save key, it just breaks it if you type anything in to it).
Ace