gpgs.multiplayer.turnbased.showSelectPlayers()

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

Overview

Shows a view that will let the user select players to invite to a turn-based multiplayer match.

Gotchas

The minimum and maximum number of players passed in should be the desired number of additional players to select — this does not include the current player. So, for a game that should handle between 2 and 4 players, minPlayers would be 1 and maxPlayers would be 3.

Syntax

gpgs.multiplayer.turnbased.showSelectPlayers( 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. Pre-selects this player to join the match.

playerIds (optional)

Array. Populate with string elements to pre-select these players. If provided, this has higher priority than playerId.

minPlayers (optional)

Number. The minimum number of players to select in addition to the current player.

maxPlayers (optional)

Number. The maximum number of players to select in addition to the current player.

allowAutomatch (optional)

Boolean. If true, displays an option for selecting auto-match players.

listener (optional)

Listener. Listener function which receives a showSelectPlayers event.