Adds an objective to a stage in a mission.
Scope
This command should be called between calls to AddStage and CloseStage in a mission's initialisation script.
Syntax
AddObjective( objective_type, [ arrow_type ]);
AddObjective( objective_type, [ gamble_string, arrow_type ]);Game.AddObjective( objective_type, [ arrow_type ])
Game.AddObjective( objective_type, [ gamble_string, arrow_type ])- objective_type: The objective type.
- gamble_string: The string gamble.
- When the objective is race and the 2nd argument is gamble, the race will be set to be a gamble race.
- Otherwise, including this string does nothing.
- arrow_type: The type of road arrows to use in this stage.
- BOTH/both/b: Place road arrows on both the nearest road and intersections.
- NEITHER/neither/n: Do not place road arrows.
- INTERSECTION/intersection/i: Place road arrows on intersections.
- NEAREST ROAD/nearest road: Place road arrows on the nearest road.
- The game also checks for n for this arrow_type, but having already checked it for NEITHER/neither/n, this check can never be true.
Examples
AddObjective("getin", "neither");
// ...
CloseObjective();AddObjective("race", "gamble");
// ...
CloseObjective();AddObjective("race", "gamble", "neither");
// ...
CloseObjective();Game.AddObjective("getin", "neither")
-- ...
Game.CloseObjective()Game.AddObjective("race", "gamble")
-- ...
Game.CloseObjective()Game.AddObjective("race", "gamble", "neither")
-- ...
Game.CloseObjective()Notes
The actual code for checking arrow_type compares the last argument against all valid arrow types, not specifically the second or third (depending on the presence of gamble). This code is stupid, hence the documentation above not acknowledging this weird behaviour.