High Score Issues

0 favourites
  • 5 posts
From the Asset Store
Create the right kind of drama with Film Scoring Tools sound library!
  • Can anybody tell me where I'm going wrong with my high score events? I've followed a couple of tutorials but I'm having issues as it sets the high score but then after a few times of playing, it's like it forgets it and so resets. So, for instance, if my high score was 10, it would set this and I'd play a few games and at the end of the third or fourth game, if I'd only got 5 points it would set the high score to 5 rather than remembering it's 10.

    I've used the persist behaviour on the text objects but this hasn't made a difference.

    Been stuck with this a while so would be great to get some advice on it.

  • You're saving the current score to local storage every time on player destroyed. You want to do so only if the current score is the highest score.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I'm still not having any luck with this. What I've done is:

    deleted 'on player destroyed', so the event is now score > high score - set item 'score' to score & set high score to score.

    I just tested this but it didn't work. For some reason the game remembers the high score correctly for around 3 games then after this it just resets for some reason, any ideas where I'm going wrong?

  • Resets to what? Do you have another event writing to the score key somewhere?

  • Turns out elsewhere in the events on player destroyed I had it setting score.

    Thanks for this - I wouldn't have thought to check if you hadn't have said that.

    Cheers!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)