GetStartupPlayerCount

Kategorie: Spieler
Ab Engineversion: 4.0 OC

Beschreibung

Returns the number of players scheduled to join the game when it initially started. This value is determined before game start, so it can be used in early scenario initialization functions such as Initialize or InitializeMap.

Syntax

int GetStartupPlayerCount();

Anmerkungen

The startup player count is not updated when a savegame is resumed with a different number of players.
The number of players actually joining the game might be lower due to clients disconnecting at game start or players trying to join with invalid player files. To get a reliable number of players, handle player joins and leaves directly in InitializePlayer and RemovePlayer callbacks or call GetPlayerCount shortly after game start.
Siehe auch: GetPlayerCount, GetStartupTeamCount
Sven2, 2013-03