How to save score automatically?
JonathanTynan.com
Member Posts: 18
Hey everyone i was just wondering how to save a score automatically. I have the high score display and rules all set up, but the only way i can figure out how to save is to use an actor with a save attribute and when clicked on it, it saves. How do you save automatically?
Comments
i.e:
Rule
When all conditions are valid
Actor overlaps or collides with Actor of type coin
-----Change Attribute: game.score To game.score + 10
-----Save Attribute: game.score to key: SCORE
Put that behavior anywhere you add.subtract from the score.
Then in the first Scene of the game, maybe the logo scene?, add a Load Attribute behavior to one of the Actors, like this:
Load Attribute: game.score from key: SCORE