Matchmaking timeout

Hello,

I’ve read a post on this topic previously here.

In my case I would like to match the player with a bot after they didn’t find a game for 2 minutes. The issue is that I don’t want to expose this API to the client as they can abuse it to keep matching themselves with bots and boost ranks.

How do I know if a matchmaking request has timed out after X seconds or somehow keep this data while requesting a ticket so I know the player did search for X seconds.

Hello @MinatoTW,

I think you can use a before and after hook on MatchmakerAdd and MatchmakerRemove respectively and check whether a minimum amount of time was spent matchmaking for that player, then mark the player as eligible for bots (also always set this to false on MatchmakerAdd), that way you can trigger the bots from the client after the maximum time has elapsed but check that the system isn’t being abused.

Best.

Hello, Thanks for getting back. Where would I store this info? In session variables or something else?

A storage object under the user or the user’s metadata.