gpgs.multiplayer.turnbased.create()

Type Function
Return value none
Revision Release 2024.3703
Keywords Google Play Games Services, game network, gpgs, multiplayer, turn-based, create
See also gpgs.multiplayer.turnbased
gpgs.multiplayer
gpgs.*

Overview

Creates a new turn-based match for the current game. If provided with auto-match parameters, the server will attempt to find any previously-created matches that satisfy these parameters and join the current player into the previous match. If a suitable match cannot be found, a new match will be created.

Syntax

gpgs.multiplayer.turnbased.create( params )
params (required)

Table. Contains parameters for the call — see the next section for details.

Parameter Reference

The params table contains parameters for the call.

playerId (optional)

String. If specified, invites only this player.

playerIds (optional)

Array. Populate with string elements to invite all specified players. If provided, this has higher priority than playerId.

listener (optional)

Listener. Listener function which receives a create event.

automatch (optional)

Table. Specifies auto-match options — see the next section for details.

Auto-Match Parameters

minPlayers (optional)

Number. Minimum number of auto-matched players.

maxPlayers (optional)

Number. Maximum number of auto-matched players.

exclusionBits (optional)

Number. Exclusive bit masks for the auto-matching request. The logical and of each pairing of auto-matching requests must equal 0 for an auto-match.

variant (optional)

Number. This is an optional, developer-controlled parameter describing the type of game to play, used for auto-matching criteria. Must be a positive integer.