question

Riccardo Iengo avatar image
Riccardo Iengo asked

Get Leaderboard: how to get multiple statistics for each player? UE4

Hi,
I would like to build a leaderboard with multiple values for each player. For example I want to assign a Best time and a Score values to each player.
The get leadeboard API is able to only call one statistic, is there a way to make this work? It's not so clear from the documentation, thanks

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Seth Du avatar image
Seth Du answered

To have all the statistics while calling GetLeaderboard API, you may define the ProfileConstraints in the request, here is an example.

{
  "StatisticName": "test",
  "StartPosition": 0,
  "MaxResultsCount": 20,
  "ProfileConstraints":
  {
      "ShowStatistics": true
  }
}
2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Riccardo Iengo avatar image Riccardo Iengo commented ·

constraints.png

Did this but I still can't call other stats. Maybe I'm missing something! (I already made the required changes in the Client Profile Options of the Game Manager.

0 Likes 0 ·
constraints.png (137.6 KiB)
Seth Du avatar image Seth Du ♦ Riccardo Iengo commented ·

When running the Level, the UE4 will print out the request in the log console. Would you check the full context in the console? I am not sure if you define the constraints properly.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.