#Typescript Update for Multiplayer Hooks
1 messages · Page 1 of 1 (latest)
I'm working with a teammate from the SDK team to see if we can get this added. I'll keep you updated!
Thank you! It is safer if we have actual types for the function calls
I just wanted to double check, how are you consuming the cloudscript typescript sdk? Are you doing so via https://github.com/PlayFab/SdkTestingCloudScript?
Yes, @obtuse minnow . There was another repo years ago but I forgot what it was called
Thanks! Trying to take a look now at that
Thank you @obtuse minnow !
I updated the CloudScript TypeScript sample to include support for the multiplayer global object, which includes Matchmaking, MultiplayerServer, Party, and Lobby APIs.
You can pick up the changes by downloading the latest CloudScript.d.ts from here: https://github.com/PlayFab/SdkTestingCloudScript/blob/master/Scripts/typings/PlayFab/CloudScript.d.ts
Once you replace your local copy, you'll get full IntelliSense and type checking for calls like:
var result = multiplayer.CreateMatchmakingTicket({
Creator: { Entity: { Id: entityId, Type: "title_player_account" } },
GiveUpAfterSeconds: 120,
QueueName: "ranked_1v1"
});
Note: the global object name is multiplayer (not match like you specified earlier). The methods include CreateMatchmakingTicket, GetMatch, GetMatchmakingTicket, JoinMatchmakingTicket, CancelAllMatchmakingTicketsForPlayer, etc.
Let me know if you run into any issues, thanks!
This is the Cloud Script used for the internal testing of all SDKs. - PlayFab/SdkTestingCloudScript
@obtuse minnow OMG this is so amazing. I've waited years for this! You are awesome!
And I assume the smaller models are also made?
I have another question wrt the get player in segment retirement
No problem! By "smaller models" do you mean the other APIs related to multiplayer?
Yea and I see that they were. So thank you for that as well.