question

chrisfitzpatrick avatar image
chrisfitzpatrick asked

multiplayer global in Cloudscript

Hello,

Poking around with some code we have here, I see something like this:

getMatchResult = multiplayer.GetMatch({....})

Looking around the forum, I've seen some mention that API endpoints are accessible in cloudscript.

So, this GetMatch function is calling

https://docs.microsoft.com/en-us/rest/api/playfab/multiplayer/matchmaking/getmatch?view=playfab-rest

But I am not seeing this multiplayer object looking at the globals mentioned in:

https://docs.microsoft.com/en-us/gaming/playfab/features/automation/cloudscript/writing-custom-cloudscript#intermediate-overview-globals-and-advanced-arguments

Just curious if there's some documentation about this? Are these other globals that are similar?

Thanks!

,

Hello,

Poking around with some code we have here, I see something like this:

getMatchResult = multiplayer.GetMatch({....})

Looking around the forum, I've seen some mention that API endpoints are accessible in cloudscript.

So, this GetMatch function is calling

https://docs.microsoft.com/en-us/rest/api/playfab/multiplayer/matchmaking/getmatch?view=playfab-rest

But I am not seeing this multiplayer object looking at the globals mentioned in:

https://docs.microsoft.com/en-us/gaming/playfab/features/automation/cloudscript/writing-custom-cloudscript#intermediate-overview-globals-and-advanced-arguments

Just curious if there's some documentation about this? Are these other globals that are similar?

Thanks!

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

·
Rick Chen avatar image
Rick Chen answered

There is no document for the predefined variable “multiplayer“. There are “server”, “entity” and “multiplayer” predefined variables. As the name indicates, the “server” variable is used to call Server APIs, the “entity” variable is used to call entity APIs and the “multiplayer” variable is used to access some of the Multiplayer APIs. You could refer to this thread: How to get/set entity objects in CloudScript?

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.