Sets the maximum number of traffic cars that will appear in a stage.
Scope
This command should be called between calls to AddStage and CloseStage in a mission's initialisation script.
Syntax
SetMaxTraffic( cars );Game.SetMaxTraffic( cars ) - cars: The number of cars that will appear in the stage.
Examples
AddStage();
// Only 2 cars will appear in this stage.
SetMaxTraffic(2);
AddObjective("dummy");
CloseObjective();
CloseStage();Game.AddStage()
-- Only 2 cars will appear in this stage.
Game.SetMaxTraffic(2)
Game.AddObjective("dummy")
Game.CloseObjective()
Game.CloseStage()Notes
The traffic car limit will persist until the level is reloaded, or this command is called again.
As such, it is a good idea to call it at the start of every mission.