Star system error in coding

PBEmpirePBEmpire Member Posts: 676
edited October 2012 in Working with GS (Mac)
Hey guys!
I have stumbled across a small prob. In my game, if you manage to hit all 3 stars, in the menu, it displays the actual stars itself. - 1hit=1star shown in menu...

But there is a prob., when the stars hit is saved when actor dies or time up or all stars collected, it displays perfectly. However when i redo the level, it replaces the older star score with the new one, which means that when during first try i hit 2 stars, it displays 2 stars. During 2nd try, i hit nothing, it also displays nothing! How do i make it such that it only saves when the score is higher?

I am using attributes instead of tables because i could not get the actual stars to represent in the menu instead of numbers, like in tshirtbooth's template.
Thanks for the help.

Comments

  • carlblanchetcarlblanchet Member Posts: 755
    If CurrentStars attribute is greater than LevelBest attribute change attribute LevelBest to CurrentStars and save LevelBest attribute then change CurrentStars to 0.

    The CurrentStars attribute is an attribute that you would want to add to count the stars collected each time a game is played, no matter what level it is use the same CurrentStars attribute. This will give you the ability to do the comparison between the amount of stars currently collected and the previous best score.

    Also instead of adding +1 to the levels best attribute when collecting a star, add it to the current stars attribute.
  • PBEmpirePBEmpire Member Posts: 676
    so how do i differentiate current stars with levelbest? in the stars
    - every hit, change attribute current stars to current stars+1.

    but how do i connect the 2 attributes?
  • PBEmpirePBEmpire Member Posts: 676
    bump?
Sign In or Register to comment.