help! load attribute can't work

cmzcmz Member Posts: 46
edited April 2012 in Working with GS (Mac)
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 ?

Best Answer

Answers

  • jckmcgrawjckmcgraw Member Posts: 647
    @cmz

    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
  • mynameisacemynameisace Hull, UKMember Posts: 2,484
    It works fine on the viewer as long as you save it as the same name.

    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
  • cmzcmz Member Posts: 46
    @mynameisace I try it ,but not work, this is my email 48108989@qq.com.I have sent my file to you, you can see it where is the wrong ,thanks for help :)
  • mynameisacemynameisace Hull, UKMember Posts: 2,484
    Did you send it to hello@mynameisace.com because I haven't received it.

    Ace
  • mynameisacemynameisace Hull, UKMember Posts: 2,484
    You haven't put a load attribute behaviour in to your game. This needs to go in your menu scene.

    Ace
  • cmzcmz Member Posts: 46
    @mynameisace I have put the actor named "loading" in scene1( top left corner ,white square),it has "load attribute behavior "
  • cmzcmz Member Posts: 46
    thanks for the help, it has been solved ! :)>-
  • EatingMyHatEatingMyHat Member Posts: 1,246
    @mynameisace Can you give details as to what was the problem and the solution? having some load/save issues as well ;)
  • mynameisacemynameisace Hull, UKMember Posts: 2,484
    I actually cannot remember what the problem was now - 21st of April was forever ago :)

    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
Sign In or Register to comment.