GetStartupPlayerCount

Category: Player
Since engine version: 4.0 OC

Description

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();

Remarks

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.
See also: GetPlayerCount, GetStartupTeamCount
Sven2, 2013-03