question

fivashov avatar image
fivashov asked

Matchmaking quick start question

Hello! I have a question about matchmaking quick start.

PlayFabMultiplayerAPI.CreateMatchmakingTicket(
    new CreateMatchmakingTicketRequest
    {
        // The ticket creator specifies their own player attributes.
        Creator = new MatchmakingPlayer
        {
            Entity = new EntityKey
            {
                Id = "<Entity ID goes here>",
                Type = "<Entity type goes here>",
            },


            // Here we specify the creator's attributes.
            Attributes = new MatchmakingPlayerAttributes
            {
                DataObject = new
                {
                    Skill = 24.4
                },
            },
        },


        // Cancel matchmaking if a match is not found after 120 seconds.
        GiveUpAfterSeconds = 120,


        // The name of the queue to submit the ticket into.
        QueueName = "myqueue",
    },


    // Callbacks for handling success and error.
    this.OnMatchmakingTicketCreated,
    this.OnMatchmakingError);

Do I have to fill in Skill = 24.4 on the client? I think it's not safe.

1. Should I implement this feature with a cloud script?

2. How can I use a cloud script to listen for the matchmaking_match_found event;

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

·
Citrus Yan avatar image
Citrus Yan answered

You can specify attributes through player entities instead of specifying them on the client: “This allows data to be stored for a user, rather than the title needing to specify it on each create ticket call”. Please check out this doc for more details:

https://docs.microsoft.com/en-us/gaming/playfab/features/multiplayer/matchmaking/ticket-attributes#specifying-through-player-entities

2 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.

fivashov avatar image fivashov commented ·

Thanks!

0 Likes 0 ·
Citrus Yan avatar image Citrus Yan fivashov commented ·

Glad it helped:)

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.