team.score
Type: NumberThis property provides access to a team's score. Note that a team's score is not the total score of its players. Rather, both players and teams are entities that are able to "have points."
Suppose a match has two teams, Red and Blue, and no one (players or teams) has any points. If you set each team's score to 1, and then set a Red Team player's score to 1, then Red Team will be in the lead.
Team scores cannot hold values outside the range [-32,768, 32,767].
Example
for each team do if current_player.biped != no_object then -- -- If the player has a biped on the map, then they must be alive. -- current_player.team.score += 1 end end
Notes
It may seem strange for teams to have distinct score values from their players, but there is a use for it. Suppose you're playing Assault, and a player arms the bomb and then quits before the bomb detonates. Normally, when a bomb detonates, a point is awarded to the player who planted it, but in this case, since the player quit, the point will be awarded to the team itself. A similar thing occurs in Stockpile, if a collected flag was placed into a team's goal by a player who quit or (perhaps accidentally) by an enemy of that team.