question

cooltom2013 avatar image
cooltom2013 asked

Help with Create Matchmaking Ticket!

Greetings I am a developer using UE4, looking to create a group matchmaking ticket with the "CreateMatchmakingTicket" function,

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

However I am a little unsure what is expected in the MembersToMatchWith, catergory and perhaps how to set it up correctly, I am aware it is suppose to be an array of entity tokens!

So down to the questions,
1) Does 'MembersToMatchWith' require just the entity or the entity plus the attributes of other players?

2) Is this example of an entity complete for the purposes of MembersToMatchWith assuming attributes are not required?
{"Entity":{"Id":"538209432809432", Type":"title_player_account","TypeString":"title_player_account"}

3) Given the entity above how would I turn this value from a string into a valid Json (Object?) that can be added to the MembersToMatchWith array in UE4 blueprints?

4) How would I add this object to the JSon array?

Very grateful!
-Tom

Matchmaking
1 comment
10 |1200

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

cooltom2013 avatar image cooltom2013 commented ·

Correction, the first { would not be part of the entity!
"Entity":{"Id":"538209432809432", Type":"title_player_account","TypeString":"title_player_account"}

0 Likes 0 ·

1 Answer

·
Sarah Zhang avatar image
Sarah Zhang answered

>> 1) Does 'MembersToMatchWith' require just the entity or the entity plus the attributes of other players?

As the API references mentioned, it requires just the entity of other players.

>> 2) Is this example of an entity complete for the purposes of MembersToMatchWith assuming attributes are not required?
{"Entity":{"Id":"538209432809432", Type":"title_player_account","TypeString":"title_player_account"}

“Entity:” isnot needed,the item of array MembersToMatchWith should be {"Id":"[YourTitlePlayerId]", Type":"title_player_account"}. You only need to use the field’s name listed in the API references.

You can refer to the following request body of CreateMatchmakingTicket.

{
 "Creator": {
 "Entity": {
 "Id": "[CreatorTitlePlayerId]",
 "Type": "title_player_account"
 }
 },
 "MembersToMatchWith": [
 {
 "Id": "[MemberTitlePlayerId]",
 "Type": "title_player_account"
 }
 ],
 "GiveUpAfterSeconds": 100,
 "QueueName": "[YourQueueName]"
}

>> 3) Given the entity above how would I turn this value from a string into a valid Json (Object?) that can be added to the MembersToMatchWith array in UE4 blueprints?

You can use “Set String Field” function that provided by PlayFab Plugin. Please refer to the following screenshot of UE4 blueprints.

>> 4) How would I add this object to the JSon array?

You can use UE4 native function “Add(Add item to array)” to add it to the Array. Please refer to the following screenshot of UE4 blueprints.


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.