I want make a function in cloud script that will be called from Playfab>Leaderboards>PrizeTable for top 10 players sending rank as a parameter to the cloud script. I will then grant Currency and Push Notification to the players from cloud script. Is It possible.
Answer by Brendan · May 14, 2017 at 06:25 AM
That's specifically what the Prize Table functionality is designed to do - perform actions on players based upon their position in the leaderboard. You can make calls to get the leaderboard, to grant VC or items, and to send push notifications in Cloud Script, but doing so for more than a few players really isn't going to be possible, as Cloud Script is really only designed for lightweight server logic - a few seconds of CPU time, at most (and calls to the server API are web API calls, so they do take a small amount time due to the communication between distinct servers).
What i want to do is call one function "GivePrize" for rank 1 to 10 and then inside GivePrize i will capture the rank and give Prize according to the rank. So is there any way to identify for which rank Give Prize was called?
Also i cannot make use of more than one action triggers due to my limit.
That's specifically what the Prize Table functionality does - it enables sending prizes and messages about those prizes to players. That's not something you'll be able to enable via Cloud Script , assuming a non-trivial number of players.