send_incident

This function sends an "incident" to the game engine. Incidents can be announcer voiceovers, medals (to be awarded to the "cause" player), or even triggers for unlocking achievements.

Arguments

incident

The ID of an event that the game engine can be told about.

cause

The cause of the incident: a player or team , or the value all_players.

target

The target of the incident: a player or team , or the value all_players.

Example

--
-- Typical code for announcing the start of a round:
--
alias announced_game_start = player.number[0]
alias announce_start_timer = player.timer[0]

declare player.announce_start_timer = 5

for each player do
   if current_player.announced_game_start == 0 and current_player.announce_game_start_timer.is_zero() then 
      send_incident(race_game_start, current_player, no_player)
      current_player.announced_game_start = 1
   end
end