game don't save highscore.

DonroncaDonronca Member, PRO Posts: 87

my game don't save the highscore.
see pic what i do wrong. i've tried it in several actors but still don't save it on an android device.

Comments

  • cbtcbt Member Posts: 644

    You can't do every 0 seconds.

  • DonroncaDonronca Member, PRO Posts: 87

    in my other game the every 0.0 seconds works.

  • mc99093mc99093 Member, PRO Posts: 133

    you have "0,0" not 0.0. you have a comma instead of a period.

  • DonroncaDonronca Member, PRO Posts: 87

    i've tried 0.1 and still not working, in game salad i press 0 and i get a comma.
    is it possible that i put it in the wrong actor?

    i've put it into the actor that spawn new actors.

  • bjandthekatzbjandthekatz Orlando, FlMember Posts: 1,375

    I would change it to if lives <= 0 then rule:
    You could be hitting the enemy and loosing 2 lives simultaneously going below 0. Are you loading the attribute?

  • DonroncaDonronca Member, PRO Posts: 87

    yes also see that, and put it in a new timer.

  • BBEnkBBEnk Member Posts: 1,764

    You could use index for tracking lives it want go below 0, and you don't need that rule in a timer it will execute when lives are zero.

  • RossmanBrothersGamesRossmanBrothersGames Member Posts: 659

    Why do you need a timer? Just put the rule if lives = 0, and if score is > highscore, into one rule together, with "all" being selected for being true, and it will accomplish the same thing without the need of a timer telling it check over and over. Basically every time the lives are 0 and the score is greater it will do what you want.

  • Thunder_ChildThunder_Child Member Posts: 2,343
    edited May 2014

    Is that a comma?

    Shouldnt that be a period 0.0 not 0,0

    Besides...I allow 200ths of a second to find score.

    Every (.2) I read once to allow at least this. I also now do this in my score actor...not spawn actor.

  • nir3112nir3112 Member, PRO Posts: 316
    edited May 2014

    Couple things:

    1. Delete the timer it's making low performence

    2. Make 1 rule like that:
      when lives <= 0 AND score > high score
      Change attribute high score to score
      Then "Save attribute"

    3. all this needs to happened before the player died so make a timer after 0.2 sec "change scene" ( do it after the save attribute)

  • daaddddaaddd Member Posts: 116

    you better use attributes such as self.positionX or any other constant to make rules like this,(exemple : if self.positionX = 160 ----> "score stuff") lives and that kind of attributes changes everytime so if any other bug is related to this specific attribute it will direct affect your saving as well. but in that case i would use it directly like @erockross said. i always make an test actor wich shows constantly the value of dynamic attributes such as lives so i can find any bugs in a easier way. hope you can fix it. regards

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    edited May 2014

    You don't need the timer.. Only the lives rule. Make sure you have a delay before the lives are reset. Use a table to store the lives. They are much more reliable. Plus with tables you don't need the load attribute either. Watch my video series on GS logic as you using that timer like that shows me you don't understand logic.

Sign In or Register to comment.