Games > The Simpsons Hit & Run > Console File Commands > MFK Commands > Stages > SetMaxTraffic

SetMaxTraffic

Sets the maximum number of traffic cars that will appear in a stage.

Context

This command should be called between calls to AddStage and CloseStage.

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 SetMaxTraffic is called again. As such, it is a good idea to call it at the start of every mission.

Donut Team © 2024 · v4.0