game.score_to_win

Type: Number

This value indicates the number of points that a player or team must be accumulate to win.

This value is read-only.

Example

-- Code borrowed from Territories, with slight modifications: play announcer 
-- voiceovers when the player approaches the score to win.

alias announced_30s_win = player.number[0]
alias announced_60s_win = player.number[1]

for each player do
   alias threshold_30s = temp_int_00
   alias threshold_60s = temp_int_02
   --
   threshold_30s = game.score_to_win
   threshold_60s = game.score_to_win
   threshold_30s -= 30
   threshold_60s -= 60
   if current_player.score >= threshold_60s and current_player.announced_60s_win == 0 and game.score_to_win > 60 then 
      send_incident(one_minute_team_win, current_player, all_players)
      current_player.announced_60s_win = 1
   end
   if current_player.score >= threshold_30s and current_player.announced_30s_win == 0 and game.score_to_win > 30 then 
      send_incident(half_minute_team_win, current_player, all_players)
      current_player.announced_30s_win = 1
   end
end

Notes