Since engine version: 1.0 OC
Assigns a player to a new team. The player limit (MaxPlayer) of the team will be considered.
int SetPlayerTeam(int player, int new_team, bool no_calls);
- Player number of the player whose team assignment you want to change.
- Team number of the team to be joined.
true, calls to "RejectTeamSwitch" and "OnTeamSwitch" are not made. Also, player hostility is not automatically adjusted (this might have to be done manually instead).
The function "RejectTeamSwitch" will be called in all game goal, rule, and environment objects. If any of these calls return
true, then the team switch will not take place. If the team switch was performed successfully, the function "OnTeamSwitch" is called in all objects mentioned above (including the player number and new and old team numbers).