Let say, for ex, if I want to grant all player with lv 30-40 a funny hat.
How can I do that with cloudscript? Is there any way to query player's PlayFabID based on some keys of player's data?
Thanks in advance.
Let say, for ex, if I want to grant all player with lv 30-40 a funny hat.
How can I do that with cloudscript? Is there any way to query player's PlayFabID based on some keys of player's data?
Thanks in advance.
As it happens, that sort of automated live game operations capability is specifically what we designed PlayStream to provide. What you can do is, set up a Segment for players whose level (a statistic in your game) is greater than or equal to 30 and less than 40 (possible or equal to - not sure if that's what you want). You could then grant the hat to them using a Segment Enter trigger, and then on the Segment Exit trigger, you could call a Cloud Script which decrements the count of that item (giving it a use count lets you remove it from player inventory by setting the count to 0).
We'll also be adding bulk segment actions later, which would allow you to do things like gifting the hat to all players who are already in that level range, if your game were already live.
No one has followed this question yet.