edsonkirchhof's Recent Forum Activity

  • Oops, sorry for the delay

    I already finished the development of my game and I didn't enter the forum anymore, I don't know if I understood exactly your problem, if I record a video of the screen I think it would make it easier.

    Although it's been so long since you commented, it must have already been resolved xD

  • This is a 2-dimentional array. The first column (at Y=0) contains scores, the second column (Y=1) contains names. After sorting, Array.At(0,0) will contain the highest score. Array.At(0,1) will contain the name of the person who made that score.

    Array.At(1,0) - second best score, Array.At(1,1) - its name

    Array.At(2,0) - third best score, Array.At(2,1) - its name

    And you should display the scores in the same event where you parse them (add another sub-event in event #3.

    Thanks for the help dop2000 your contributions are always helpful

  • ok dop2000, I managed to put it in order and make it appear on the screen, but why doesn't the names appear?

  • Why "ghost racer"?? I meant this example:

    And you can't load your data directly into the C3 array. You need to load (parse) it into JSON object first. Then do something like this:

    I finally made some progress, I managed to put the data in the array, but this part is now useless, right?

    so the array loads the data all disorganized.. now what?

  • Load into a JSON object. Then use "JSON For each key" loop and insert every value into an empty array. Can't tell you more details because I don't know the format of your JSON data.

    There is an example project in C3 showing how to work with JSON, check it out.

    my data is like this

    https://teste-e9ce3-default-rtdb.firebaseio.com/ranking.json

    I looked at the "ghost racer" model but it works with local.storage to load the data, my data is in an online base, I found tutorials that use "webstorage" but I think this function doesn't exist anymore. I tried this and it doesn't load the data

  • After you copied all values into an array, you can use "Array Sort" action. It will sort by the first column, so make sure that it contains the scores, not names.

    Yes I understand that you have to copy the data to the array, but how do you load firebase data into the array?

    I can't find any topic, tutorial or video about it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Looks like the response from Firebase comes in JSON format. You can load (parse) it into JSON object, then loop through all scores in JSON and copy them into an array. Then sort the array and display sorted values on the leaderboard.

    yes, but i don't know which line of code i use to sort

  • I did this rating online with firebase

    but i don't know how to make it sort the scores from lowest to lowest

  • I want it to open a dialog only the first time I click a button in the game.

    My game has no character, it's all by touch

  • Subscribe to Construct videos now

    the sprites are the same size, in one place it works, and in the other it doesn't. Does not make sense

  • I did this for my tillage/planting system and it works perfectly, but with the trees it doesn't

  • how to create an object that cannot overlap?

edsonkirchhof's avatar

edsonkirchhof

Member since 3 May, 2022

None one is following edsonkirchhof yet!

Trophy Case

  • 2-Year Club
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

5/44
How to earn trophies