Hello,
Is it possible to parse server.GetPlayersInSegment() result in CloudScript ?
And if it's possible how to do that ?
Thx in advance
Hello,
Is it possible to parse server.GetPlayersInSegment() result in CloudScript ?
And if it's possible how to do that ?
Thx in advance
Bear in mind that you only have a few seconds of CPU time to work with when it comes to Cloud Script - it's really meant to be used for lightweight actions. So you could get the first set of users, but if you wanted to take action on each or try to use the continuation token to iterate across the full segment, that likely would not work. We'd instead recommend using a Task (Automation->Tasks) instead, targeting it to perform an action on all users in the segment.
I'm trying to make a very simple asynchronous multiplayer system. When a user is searching for a match there is two case.
I requets the tag to know if there is a user who have already create a match.
If not, I tag this user and create a match Object in his playerdata.
When a match can start because opponents are paired, each player progression is saved in his playerdata.
So when I use this GetPlayersInSegment a small set of user is enough. However, I have difficulty to parse the result of the request in cloudscript. Can you show me some example of serialization/parsing in cloud script ?
Questions and Answers are moderated until you have a non-zero reputation, in order to prevent spammers from flooding our forums (we had issue with a previous forum system).
Now, for your feature use, the user segmentation system isn't going to work for matchmaking, the way you have in mind - it's simply not designed for that use case. We'll be providing a true asynchronous matchmaker in a future release, but for now I would recommend using Photon Realtime, as described in this thread: https://community.playfab.com/questions/515/207129407-Persistent-turn-based-games-.html
2 People are following this question.