game-common / pragma.matchmaking / NewGameInstance /

NewGameInstance #

class NewGameInstance(var ext: ExtGameInstance, var gameServerZone: <ERROR CLASS>)

Represents a successful matchmaking result that will be used to allocate a new game when returned from MatchmakingPlugin.initialize or MatchmakingPlugin.matchParties.

Constructors #

NewGameInstance

fun NewGameInstance(ext: ExtGameInstance, gameServerZone: <ERROR CLASS>)

Functions #

NameSummary

addParties

fun addParties(parties: List<Matchmaking.Party>, teamNumber: Int = 0)

Add multiple parties to the NewGameInstance. Always sets the team number of all players within all parties, defaulted to 0.

continueMatchmaking

fun continueMatchmaking(key: MatchmakingRpc.MatchmakingQueueKey)

Indicate that after this NewGameInstance is created, it should be added back into matchmaking.

setExtGameParty

fun setExtGameParty(party: Matchmaking.Party, ext: ExtGameParty)

Set the ExtGameParty payload for a given party in the new game instance. This data will be set on the GameInstance for the specified party and will override any previously set ExtGamePlayer for this party, therefore we recommend setting this once when the NewGameInstance will be returned from the matchmaking plugin.

setExtGamePlayer

fun setExtGamePlayer(player: Matchmaking.Player, ext: ExtGamePlayer)

Set the ExtGamePlayer payload for a given player in the new game instance. This data will be set on the GameInstance for the specified player and will override any previously set ExtGamePlayer for this player, therefore we recommend setting this once when the NewGameInstance will be returned from the matchmaking plugin.

setTeamByPlayers

fun setTeamByPlayers(players: List<Matchmaking.Player>, teamNumber: Int)

Update multiple players’ team number.

Properties #

NameSummary

ext

var ext: ExtGameInstance

A customer-defined payload of extra game information that will be used to create the game instance.

gameServerZone

var gameServerZone: <ERROR CLASS>

A string id that indicates which game server zone that game will be created within.

markedToContinueMatchmaking

val markedToContinueMatchmaking: Boolean

Calculated as true if NewGameInstance.continueMatchmaking has been called.

matchmakingQueueKey

val matchmakingQueueKey: MatchmakingRpc.MatchmakingQueueKey

The key for the matchmaking queue that the game will be added to only if markedToContinueMatchmaking is true. Not set if NewGameInstance.continueMatchmaking has not yet been called.

parties

val parties: List<Matchmaking.Party>

The list of parties in the NewGameInstance. List is copied when retrieved.

players

val players: List<Matchmaking.Player>

The list of players in the NewGameInstance. List is copied when retrieved.