How to read multiple leaderboards?

How to read multiple leaderboards/stats via Online Subsystem? “ReadLeaderboardInteger” node reads only one single stat per request. My game have 30+ leaderboard stats, so it takes lot of time to read them all.

up! up! up!

trying to necro this thread i guess.
i’m trying to create a leader board system where i can select different leaderboards. after the first read, the entries seem to get messed up.
tried clearing various variables/arrays for this, but no getting it right, so i guess i don’t fully understand the logic of the code.

is this where i need to reset the read object? or does someone have an example for multiple leaderboard reads?


//because we're reading multiple leaderboards, we may need to reset this???
ReadObject->ColumnMetadata.Empty();
new (ReadObject->ColumnMetadata) FColumnMetaData(StatName, EOnlineKeyValuePairDataType::Int32);

I am very sorry to answer this after many years.

To read multiple Leader I recommend the following (It works 100% in my case).

  1. Don’t try to do this in a tick, run it in a beginplay
  2. Create a variable of type Array and add all the names of your statistics there.
  3. I recommend you to make a module “for each loop with delay” (Blueprint Snippets: Foreach Loop with Delay - YouTube) and in my case it goes well with 5 seconds for each element.
  4. Join your variable to this for each, you can create a map<Name,Integer> to store the Stat and its number, then play with these variables and do not read the leaderboard again.

Also important creates the leaderboard on Steam, otherwise it does not work, also if one of them you do not place it and this is part of item 1-29 will not read more from there (https://partner.steamgames.com/apps/leaderboards/{YOUR_APPID}).

Can you please share some example, or blueprints because I’m trying to retrieve and save the leaderboards values to a map variable using the foreach but not work at all, I don’t know what im doing wrong :frowning_face:

Try a foreach with delay