Forum Mod Bakery Docs

How to change traffic cars in simpsons hit and run?

Posted in Support
Please login to contribute to the conversation.
You'll need a text editor, the CustomFiles hack, and copies of scripts\missions\level0X\level.mfk and leveli.mfk (X = level number).

level.mfk's relevant code
//LOADING THE TRAFFIC CAR MODELS FOR USE
LoadP3DFile( "art\cars\huskA.p3d" );
LoadP3DFile( "art\cars\taxiA.p3d" );
LoadP3DFile( "art\cars\sedanB.p3d" );
LoadP3DFile( "art\cars\sportsA.p3d" );
LoadP3DFile( "art\cars\pizza.p3d" );

leveli.mfk's relevant code
	CreateTrafficGroup( 0 ); //ONLY ONE TRAFFIC GROUP PER LEVEL AND EACH ONE CAN HAVE A MAX OF 6 VEHICLES.
//SYNTAX: The vehicle name (loaded in level.mfk), how many of it can be active in a region at once, and if it can appear parked or not (optional, exclude or set to anything higher than 0 for false).
		AddTrafficModel( "taxiA",2 );
		AddTrafficModel( "sedanB",1 );
		AddTrafficModel( "sportsA",1 );
		AddTrafficModel( "pizza",1,1 );
	CloseTrafficGroup( );

If you want to take things further there's also the CustomTrafficSupport hack.