Kategorie: Spieler
Ab Engineversion: 7.0 OC
GetStartupTeamCount
Beschreibung
Returns the number of teams scheduled to contain players when the game initially started. This value is determined before game start, so it can be used in early scenario initialization functions such as Initialize or InitializeMap. The function does not count empty teams.
Syntax
int GetStartupTeamCount();
Anmerkungen
The startup team count is not updated when a savegame is resumed with a different number of players.
The number of teams actually containing players might be different due to clients disconnecting at game start, players trying to join with invalid player files or other scripts manipulating player joins and team distribution. To get a reliable number of teams, query team counts after all players have joined by calling GetTeamCount shortly after game start.
In non-network mode, teams have not yet been assigned at game start. In this case, the function returns either the number of startup players (GetStartupPlayerCount()), or the maximum number of available teams, whichever is lower. Of course players may choose different team distribution.
Siehe auch: GetStartupPlayerCount, GetTeamCount