Sets the maximum number of traffic cars that will appear in a stage.
SetMaxTraffic( cars );
Game.SetMaxTraffic( cars )
- cars: The number of cars that will appear in the stage.
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()
The traffic car limit will persist until the level is reloaded, or SetMaxTraffic is called again. As such, it is a good idea to call it at the start of every mission.