GetTeamCount

Category: Teams
Since engine version: 1.0 OC

Description

Returns the number of teams currently in the game.

Syntax

int GetTeamCount();

Parameters

Remark

As players may join and leave a game at runtime, there can be "gaps" in player indexing, meaning player numbers may skip certain values. GetPlayerCount returns the actual number of players, not the index of the last player plus one. To process all joined players you need special handling (see example) - you cannot simply run from index 0 to GetPlayerCount() - 1. See the example for GetTeamByIndex.
See also: GetPlayerTeam, GetTeamByIndex, GetTeamColor, GetTeamName, Teams
Clonkonaut, 2008-04