How do I save multiple scores to array and local storage?

0 favourites
From the Asset Store
"Easy Local Notifications" enhances games with customizable local notifications.
  • Add a small wait before set item action and see if it saves correctly. If you have no other events for saving then can't see how it would go wrong.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Nope. Didn't work. And of course, I've tried every other solution that was suggested in this post and none of those worked for me either. Maybe there's some weird bug? Or I'm just doing something totally wrong. I have no idea at this point. I've been stuck on this for a while now though. Since the game works otherwise, I'm at the point where I'm thinking of doing a handwritten leaderboard on a whiteboard and leave it at that. It's just so frustrating. Thank you for all your help though!

  • Feel free to share the project file then we can see where the problem is that's all we can really do now. You'll have to explain what the current issue is.

  • This is totally random and I don't know why it worked, but I finally got it to work by starting a whole new project and following the tutorial I originally used at the beginning of this post. And yes, that does mean I reverted some of the changes I made throughout this. But it's saving to the array now, so I'll just stick with that. So now that I finally have that, how would I sort the names by score? I figured I could include the global variable "score" in the text object after the name, but it keeps sorting it alphabetically.

  • If you are using an array then it's more usual to store the score in the array with it. You would need to get used to arrays, when you insert a name from the events I've seen it goes in at 0,0 so the score you would set at 0,1. You can use array sort to sort a Y so the second column with the scores. I prefer to do it a different way, run through each row until I find a score that is lower than mine then insert a new row and the score at that point.

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