question

tombatsford avatar image
tombatsford asked

Is it possible to know client side when a cloud script triggered by a play stream event has been completed?

Hey, I am working on adding starting items to a bundle for our players when they first login to playfab. I have created a bundle containing the items and i grant the bundle to the player when the account is created using the "player_added_title" playsteam event.

After receiving the sign in response I then proceed to get the clients inventory using the GetUserInventory API call. This is where my problem lies, is there any way that i can guarantee that the event triggered from "player_added_title" has finished executing and that all items granted from the bundle have been successfully added to the players inventory before calling get user inventory?

Currently the inventory api call is only returning the bundle itself and 3 or 4 of the items (which i am assuming are the ones that have been granted by the bundle so far). This question also applies to all cloud scripts triggered by play stream events, is there a way to notify the client that the cloud script has finished executing?

Thanks.

CloudScriptPlayStream
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

Given that this would require some form of persistent connection to the client, no, that's not an option currently (though we are investigating possible routes for that in future). Right now, specifically for your new user experience, I would recommend simply holding off on getting the player inventory during the introductory elements of the game. Assuming you're attempting to sign into the player account on start, using the device ID, or creating the account if it doesn't exist, this should be unnoticeable by the player.

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.