star system
beastyfurkan
Member, PRO Posts: 35
I have a star system in my game where theres three stars and I unlocked each one in the scene then I put when overlap or collide with a plane game level1 stars to game level 1 stars +1 to all three. My problem was if I collect one star and play the level again and get 2 stars it will show I collected 3 stars.
Comments
If game.stars > level1stars
change attribute level1stars to game.stars
So if level1stars had 1 and then next play you got 2, with the 2 being greater it would overwrite the 1 with a 2.
You must also make sure that the game.stars value is being reset to 0 before each play, otherwise, it'll just add up from the previous attempt.
http://gshelper.com/?p=1476