question

webdornald avatar image
webdornald asked

The player_added_title is not called correctly

Recently, something happened to me that caused the player_added_title trigger to fail to call properly. This is an event that invokes an Azure Function with UpdateUserReadOnlyDataAsync in to set the DB when a new player is created. Because of this, I changed the event type to player_created, but it didn't work out after a day. Is this a bug? Or is it a conflict caused by me calling the GetPlayerTitleData function as soon as the player is created? Attach a screenshot of the case where the trigger runs correctly in the same situation and when it doesn't.6016-untitled-1.png

Player DataPlayStream
untitled-1.png (413.9 KiB)
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

·
Xiao Zha avatar image
Xiao Zha answered

If you want to invoke the Azure Function when a new player is created for a title, you should use the “player_added_title” event instead of “player_created” event. Because the former will be triggered once when a new title_player_account is created in each Title under a Studio, while the latter will only be triggered once when the master_player_account is created, and the master_player_account is only created once under a Studio.

So, I write an Azure Function to call UpdateUserReadOnlyData API to update the player read only data and set a Rule (without any conditions) with “player_added_title” to trigger the Function when a new player is created. Then I create hundreds of new players, and each of them has successfully update the read only data.

If your process is like this, since I can't reproduce your issue, you may check the Azure Portal to see if the Azure Function has been called and check the Data Explorer to see if the "player_triggered_action_executed_cloudscript" and "player_action_executed" events are generated but not shown in the real time PlayStream Monitor. If the Azure Function is not called, please provide us with your Title id and more untriggered players’ PlayFabId for investigation.

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.