Can I manually start multiplayer game server from cloud script?
Can I manually start multiplayer game server from cloud script?
You can call the Multiplayer API RequestMultiplayerServer on CloudScript to launch a Multiplayer Server instance. The code can be something like this. You can use whole method set of multiplayer using multiplayer.[ApiName];.
handlers.requestServers = function (args, context) { var apiResult = multiplayer.RequestMultiplayerServer({ BuildId: "[YourServerBuildId]", SessionId: "[YourSessionId]", PreferredRegions: [ "EastUs" ] }); if (apiResult != null) return apiResult; else return false; };
So I spent a whole day researching the problem, it turned out that BuildID is needed to request a multiplayer.RequestMultiplayerServer. The documentation doesn't say that.
Could the typing in the projecct https://github.com/PlayFab/SdkTestingCloudScript typescript project be updated with this multiplayer object?
There is also a code sample from our community that shows something similar Solias99/playfab-mps-azure-functions: Function used for requesting and getting a PlayFab multiplayer server through an Azure Cloud Function (github.com)
8 People are following this question.