High Score save driving me nuts
beefy_clyro
Member Posts: 5,394
Hello. I have a problem which is driving me mad now and i have spent a bit of time now over the weekend and just cant get it functioning problem.
I have a highscore list - 1st, 2nd, and 3rd.
I have global attributes created for current score, best score, best score 2 and best score 3.
Rule
All
When game.life <1
when current score > best score
Have tried change and constrain attribute - change attribute best score 3 to best score 2
save best score 3
After 0.1 second
Change attribute best score 2 to best score
save best score 2
After 0.2 seconds
change best score to current score
save best score
Rule
All
If game.life <1
current score > best score 2
current score < best score
change attribute best score 3 to best score 2
save best score 3
After 0.1 seconds
change attribute best score 2 current score
save best score 2
Rule
All
Game.life <1
current score > best score 3
current score < best score 2
change attribute best score 3 to current score
save best score 3
Now what is happening is that all scores start as 0. lets say you score 10 points it displays;
1. 10
2. 0
3. 0
Next go you get 20
1. 20
2. 10
3. 0
Then you beat your top score again
1. 60
2. 50
3. 20
In the last attempt you beat the score by a bit but it seems to pick up another score (yet you never get to a point where you finished with 50 points. The figures are examples but hopefully you understand what im saying. Its very frustrating and i just cant figure out why and im out of ideas! Grrr. Any help would be greatly appreciated. Thanks
I have a highscore list - 1st, 2nd, and 3rd.
I have global attributes created for current score, best score, best score 2 and best score 3.
Rule
All
When game.life <1
when current score > best score
Have tried change and constrain attribute - change attribute best score 3 to best score 2
save best score 3
After 0.1 second
Change attribute best score 2 to best score
save best score 2
After 0.2 seconds
change best score to current score
save best score
Rule
All
If game.life <1
current score > best score 2
current score < best score
change attribute best score 3 to best score 2
save best score 3
After 0.1 seconds
change attribute best score 2 current score
save best score 2
Rule
All
Game.life <1
current score > best score 3
current score < best score 2
change attribute best score 3 to current score
save best score 3
Now what is happening is that all scores start as 0. lets say you score 10 points it displays;
1. 10
2. 0
3. 0
Next go you get 20
1. 20
2. 10
3. 0
Then you beat your top score again
1. 60
2. 50
3. 20
In the last attempt you beat the score by a bit but it seems to pick up another score (yet you never get to a point where you finished with 50 points. The figures are examples but hopefully you understand what im saying. Its very frustrating and i just cant figure out why and im out of ideas! Grrr. Any help would be greatly appreciated. Thanks
Comments
Start
1. 0
2. 0
3. 0
Play one go and score 100 points
1. 100
2. 80
3. 0
I seriously cant figure out where its getting that number 2 score from!
Rule
All
When game.life <1
when current score > best score
change attribute best score 2 to best score 3
save best score 3
After 0.1 second
Change attribute best score to best score 2
save best score 2
After 0.2 seconds
change current score to best score
save best score
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
If highsocres are as follows
1. 30
2. 20
3. 10
You then break your high score and get 80
Going by your suggestion i think the results will end up like
Change best score 2 to 3 = 20 changing to 10
Change best score to 2 = 30 changing to 20
Change current score to best score = 80 changing to 30
Running through it again, I can't see anything wrong personally, so have no idea what's going wrong. i'll have some spare time today and make a test if you like, see if I can spot anything that way.
:-)
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
:-)
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
I needed to create a scoreboard for my own game. I don't know how other people do it but this is what I did:
Best Score (Demo)
@JackBQuick - Sweet, im not with my mac now so i'll try it out later, thanks.
I think my gameproj maybe slightly corrupted! The save in theory should work!
Also, i have some actors, i drag them on to the scene, edit the instance and delete all the rules, preview it on my phone and they still do what the prototype was set to do, even though the rules have been deleted! Its weird, so i had to copy the actor and delete the rules from the prototype and it now works as it should! Everything else is fine, just those weird problems but im right at the end and nearly finished now.
http://gamesalad.com/game/play/52365
http://gamesalad.com/forums/topic.php?id=5524