question

PelleB avatar image
PelleB asked

Rules: how to do condition string for leaderboard source

Hello, i am trying to do some rules that trigger actions whenever a set leaderboard gets reset, for example to deliver a "participation" award, adding a statistic value to a separate leaderboard.

i know the prizetable does this but it is limited to top players.

in the condition field for player_ranked_on_leaderboard_version we can already check if it was a reset and there is a field for LeaderboardSource but the object that is Leaderboard source contains several fields.

       
"LeaderboardSource": 
{
 	"Statistic": 	{
            "StatisticName": "TestLeaderboard",
            "StatisticId": 1008235994
        }
    }

Thank you for your help.

Leaderboards and Statistics
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

·
brendan avatar image
brendan answered

I would use a Rule that increments the participation statistic for the player when you get the https://api.playfab.com/playstream/events/player_statistic_changed event, if StatisticPreviousValue is null (meaning the player didn't have a score previously).

10 |1200

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

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.