Saving/Sorting Global Variables into Array (as High Score) ?

0 favourites
  • 4 posts
From the Asset Store
Globals 2.0
$3.99 USD
Globals 2.0 stores and group variables. You can also load and save data (variables) from/to JSON files.
  • My game has player's name, levels, points and lives and they are all global variables. I want to create a high score table based on those information.

    Does anyone have example of how to save global variables into array? and how to sort them (if a new high score is lower than top score but higher than the rest of scores) ?

    I am not very familiar with arrays.

    Attached is a picture of my high score setup (5 slots, in the example, the game is only 3 times played, so 2 are left blank)

  • Anyone? a little help?

  • I'll be working on this with someone who can code for my own game tomorrow. If I can find a way I'll let you know.

    But if anyone already knows and can save me some work, that'd be great too.

    Edit: Keep an eye on this post too

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Mathijs90

    Thanks.

    I figured the sorting part now. I'm not yet trying the "play game, die in game, save the scores, etc." but I'm setting values directly and sorting it via key presses. I meant that I have made some progress.

    I have to stop now because I'm going out.

    I'll try the "saving and sorting scores after dying" part later on. I'll update this if I succeeded.

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