Download

How do you save fastest time?

I have a save system for a high score and I am trying to do the same with the fastest time but I’m hitting a few hurdles along the way. I’m using an integer>integer off the high score and it works perfectly.

However, when I do the same for the best time I use an integer<integer because I want to save the lower number the only problem is it won’t save any number higher than one.

I think I know why but I’m not sure how to fix it. When you want to save a high score the game has to wait until you have more points than the points saved and then replaces it with the new score but for best time which is a lower number lets say the best time is 20 seconds and you are saving a number lower than that as soon as you start the game you already have a better time than 20 seconds so it saves that straight away. One second.

When are you checking for the new lowest time? I assume this should be happening at the end of a play session but from your explanation it sounds like it’s being called at other times?