question

ravibio avatar image
ravibio asked

Check player data for changes

I'm trying to create a very basic report system in my game. Here's how it works:

  1. Player 1 performs an action on Player 2 and calls an Azure cloud function.

  2. The cloud function then processes the action and returns a report to Player 1 It also saves the report in Player 2's player data.

  3. The next time Player 2 logs into the game, they will receive their report when their data is loaded.

However, If Player 2 is logged in at the time of the report, is it possible to check if a specific key/value data(where reports are written) has been changed by the cloud function, and if so, how frequently can this check be performed?

I know this may not be the ideal way to accomplish this, but I believe it's the simplest way for my use case. Thanks!

apislimits
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

·
Neils Shi avatar image
Neils Shi answered

Currently, PlayFab does not provide a feature that checks whether player data is changed. In your case, you may let players call the API GetUserData directly to get the latest report and clear the data after the player has finished reading. You can also create an additional player data to save the history of reports data. Please note that when multiple players perform actions on one player and generate reports at the same time, then updating the user data will have conflict issues. If this does not meet your needs, we suggest you implement this functionality through an external database.

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.