question

Martin Brandel avatar image
Martin Brandel asked

How to see multiplayer server cloudscript calls through playstream?

I can't seem to find any information or questions on getting playstream events from a multiplayer server calling a cloudscript function. - I do not get any events from my current server even though GeneratePlayStreamEvent is true.

I am trying to debug an issue where the cloudscript function "playerWonOnlineMatch" seems to be called ~7 seconds after it should be, and is not called at all if the players leave the match too soon after it is over (which they should not be able to do until after the script is called).

apisCloudScript
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

·
Seth Du avatar image
Seth Du answered

If Cloud Script function is called and GeneratePlayStreamEvent is true, there should be PlayStream Event. However, you may still need to wait for few seconds before this event is displayed in the Data Explorer.

According to your description, there can be issues on the server build logic. Does the server build invoke onServerShutdown() immediately when there is no connection from clients? You may delay or check if the finishing work is done before the server is shutting down.

3 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Martin Brandel avatar image Martin Brandel commented ·

GeneratePlayStreamEvent is true and couldscript function is called but I see nothing in playstream.

What is the event name for cloudscript from server? Is there any way I can filter for cloudscript playstream events from my server?

0 Likes 0 ·
Martin Brandel avatar image Martin Brandel commented ·

Got it, found it under "player_executed_cloudscript".

I still have the issue where it seems to take ~7 seconds to execute my cloudscript at the end of the online match. Any idea why this could be?

0 Likes 0 ·
Seth Du avatar image Seth Du ♦ Martin Brandel commented ·

This should be issues on the server build. I am not sure of the server-side logic, but you may refer to Connect directly to debug game servers - PlayFab | Microsoft Docs to monitor the state changes and debug this issue.

0 Likes 0 ·

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.