WorldRankService
WorldRankService : Instance
Overview
WorldRankService is a service provided for players to save the score acquired from world in the form of a leaderboard and retrieve it.
Key features such as score increase (Increment) and score retrieval (GetScore) induce competition among players and allow an easy implementation of rank-based content both in-game and out-game.
Uploaded scores are automatically sorted in descending order in backend; the result is displayed in the Top Scorer section on top of the world detail screen that is displayed before entering into world.
This service works only on server environment; it cannot be called from client script.
Properties
Methods
GetScore
Returns the current score of the player listed on the leaderboard.
Parameters
Player Player
The player who is to check current score.
Return
number
The returned score.
Code Samples
IncrementScore
Uploads the score variance of a specified player to the leaderboard. Score must be an integer, and variance must be a positive number. The maximum allowed variance is 100,000. Any request with a variance exceeding this limit will not be processed.
Parameters
Player Player
The player whose score is to be uploaded.
number Score
The score variance.
Return
void
Code Samples
Events
Last updated