game don't save highscore.
Donronca
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.
My apps in Appstore
The Adventure of Stario : https://itunes.apple.com/us/app/the-adventure-of-stario/id866628626?l=nl&ls=1&mt=8
Fruit Catcher - Catch 'em all : https://itunes.apple.com/us/app/fruit-catcher-catch-em-all/id888480619?l=nl&ls=1&mt=8
Comments
You can't do every 0 seconds.
in my other game the every 0.0 seconds works.
My apps in Appstore
The Adventure of Stario : https://itunes.apple.com/us/app/the-adventure-of-stario/id866628626?l=nl&ls=1&mt=8
Fruit Catcher - Catch 'em all : https://itunes.apple.com/us/app/fruit-catcher-catch-em-all/id888480619?l=nl&ls=1&mt=8
you have "0,0" not 0.0. you have a comma instead of a period.
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.
My apps in Appstore
The Adventure of Stario : https://itunes.apple.com/us/app/the-adventure-of-stario/id866628626?l=nl&ls=1&mt=8
Fruit Catcher - Catch 'em all : https://itunes.apple.com/us/app/fruit-catcher-catch-em-all/id888480619?l=nl&ls=1&mt=8
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?
Need Help? Email Me | Templates | Full Game Source Code
yes also see that, and put it in a new timer.
My apps in Appstore
The Adventure of Stario : https://itunes.apple.com/us/app/the-adventure-of-stario/id866628626?l=nl&ls=1&mt=8
Fruit Catcher - Catch 'em all : https://itunes.apple.com/us/app/fruit-catcher-catch-em-all/id888480619?l=nl&ls=1&mt=8
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.
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.
www.rossmanbrosgames.com
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.
Complete Guide to iOS Publishing {} Complete Guide to Mac Publishing
Couple things:
Delete the timer it's making low performence
Make 1 rule like that:
when lives <= 0 AND score > high score
Change attribute high score to score
Then "Save attribute"
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)
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
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.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS