set_player_team

Sets the team for the specified player.

ArgumentTypeDescription
player:realID of the player to get the team of
value:realThe value to set. Should be either 1 or 2

Example, called from attack_update.gml:

// changes teams at the beginning of your taunt:
if (attack == AT_TAUNT && window == 1 && window_timer == 1) {
if (get_player_team( player ) == 1) {
set_player_team( player, 2 );
} else {
set_player_team( player, 1 );
}
}