question

kpansavuth@gmail.com avatar image
kpansavuth@gmail.com asked

How can I query player's PlayFabID, for ex : all player with lv 30-40?

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.

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

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.

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.