How to save score automatically?

JonathanTynan.comJonathanTynan.com Member Posts: 18
edited November -1 in Tech Support
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

  • firemaplegamesfiremaplegames Member Posts: 3,211
    Wherever you are increasing the score, just add a Save Attribute behavior after that.

    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
  • JonathanTynan.comJonathanTynan.com Member Posts: 18
    thanks that really helped. i think the main problem with my game is that there is too many unnecessary rules. but this should really come in handy in future games
Sign In or Register to comment.