Call of Duty 4: RainFX

From COD Modding & Mapping Wiki
Jump to navigation Jump to search


Create a Rain effect on your MP map using this tutorial.

In your mp_yourmap.gsc add the following. You will find your GSC file here (C:\Program Files\Activision\Call of Duty 4 - Modern Warfare\raw\maps\mp), right after maps\mp\_load::main(); add the following:

maps\mp\mp_yourmap_fx::main();

Open Notepad and make a new file called mp_yourmap_fx and add the following infomations then save it to the same folder as your GSC Files.(C:\Program Files\Activision\Call of Duty 4 - Modern Warfare\raw\maps\mp)

main()
{
   level._effect[ "rain_heavy_mist" ]       = loadfx( "weather/rain_mp_farm" );
   level._effect[ "lightning" ]          = loadfx( "weather/lightning_mp_farm" );

   //ambient runners
   level._effect[ "water_noise_ud" ]       = loadfx( "ambient_runners/mp_farm_water_noise_ud01" );
   level._effect[ "water_noise" ]          = loadfx( "ambient_runners/mp_farm_water_noise01" );
   
/#
   if ( getdvar( "clientSideEffects" ) != "1" )
      maps\createfx\mp_yourmap_fx::main();
#/      
}

Go in the directory "C:\Program Files\Activision\Call of Duty 4 - Modern Warfare\raw\maps\" make a new Folder called: [b][i]createfx [/i] [/b],then inside that folder open notepad and make a file called

mp_yourmap_fx.gsc 

Put the following into the created file:

main()
{
	ent = maps\mp\_utility::createOneshotEffect( "rain_heavy_mist" );
	ent.v[ "origin" ] = ( X, Y, Z );
	ent.v[ "angles" ] = ( 270, 0, 0 );
	ent.v[ "fxid" ] = "rain_heavy_mist";
	ent.v[ "delay" ] = -15;

	ent = maps\mp\_utility::createOneshotEffect( "lightning" );
	ent.v[ "origin" ] = ( X, Y, Z );
	ent.v[ "angles" ] = ( 270, 0, 0 );
	ent.v[ "fxid" ] = "lightning";
	ent.v[ "delay" ] = -15;

	ent = maps\mp\_utility::createOneshotEffect( "water_noise_ud" );
	ent.v[ "origin" ] = ( 0, 0, 0 );
	ent.v[ "angles" ] = ( 270, 0, 0 );
	ent.v[ "fxid" ] = "water_noise_ud";
	ent.v[ "delay" ] = -15;

	ent = maps\mp\_utility::createOneshotEffect( "water_noise" );
	ent.v[ "origin" ] = ( 0, 0, 0 );
	ent.v[ "angles" ] = ( 270, 0, 0 );
	ent.v[ "fxid" ] = "water_noise";
	ent.v[ "delay" ] = -15;
}

Note that X, Y, Z corresponds to the coordinate of the origin of the rain FX, the radius of this FX is about 2500*2000 so you might need to add more at different points to cover the entire map.

- Save and close file, in the CreateFX folder.

In your Compiler. open up you update zone-file button and add the following to your ZoneFile

fx,weather/rain_mp_farm
fx,weather/lightning_mp_farm

Note that some FX like ambient_runners are in the /main/xxx.iwd and do not need to be loaded in your CSV Zone File.

Note that the technique described Here can be also used and might be easier.


--Zeroy. 23:52, 15 October 2008 (UTC)