question

Kyle Meadows avatar image
Kyle Meadows asked

How would I reject matchmaking for a player via cloudscript?

I'm trying to not allow a player to find a new game while they're 'in' an existing game. When a match is found, I flag a player is in a game using player data and save the server info. When the game finishes, I would flag that they're not in a game.

I see a trigger for when a player is matched, but I'm not sure how to stop a player from looking for a match before this is called. Is there some kind of trigger for when a player requests to find a new match that I can listen to and return whether or not they're allowed?

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

Players can create as many tickets as they want if their previous tickets are successfully matched, the current Matchmaking system does not have a native mechanism that supports rejecting players that are “in a game”, that’s something you need to implement by yourself. In your case, you can prevent the players from creating matchmaking tickets when they are flagged as “in a game”. For instance, if players are flagged as “in a game”, disable the “Find a match” option for them.

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.

Kyle Meadows avatar image Kyle Meadows commented ·

By "disable find a match" you mean on the client? I would really like to do it server side so players can't be in multiple matches at once. Is there any way for me to make a request for this feature? It seems fairly important for any game that wants to have a competitive aspect to it.

0 Likes 0 ·
Citrus Yan avatar image Citrus Yan Kyle Meadows commented ·

Yes, that was what I mean, and sure, you can make a feature request about it. Or, you can also try put the ticket creation process on the server side using CreateServerMatchmakingTicket, and checks the player's status before calling this API.

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.