Page 1 of 1

How to add Rain/Thunder & Lightning to your Maps.

Posted: March 5th, 2008, 7:51 am
by steveuk
How to add Rain/Thunder & Lightning to your maps

1: In your MP_Mapname.gsc add the following.you will find your GSC file
here (C:\Program Files\Activision\Call of Duty 4 - Modern Warfare\raw\maps\mp)

NOTE: you may have to edit the figures, 2548,0,27000,0,1100), 3) ect to your own map referance Grids.

Code: Select all

main()
{


level._effect[ "rain_heavy_mist" ] = loadfx( "weather/rain_mp_farm" );
        maps\mp\_fx::loopfx("rain_heavy_mist", (2548.0, 2700.0, 1100), 3);
level._effect[ "lightning" ]   = loadfx( "weather/lightning_mp_farm" );   
maps\mp\_fx::loopfx("lightning", (2500.0, 2700.0, 1100), 10);


	maps\mp\_load::main();


If you have (maps\mp\_load::main();) already in your GSC file you dont need to add this one.

2: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)

Code: Select all

main()
{
	level._effect[ "wood" ]					 = loadfx( "explosions/grenadeExp_wood" );
	level._effect[ "dust" ]					 = loadfx( "explosions/grenadeExp_dirt_1" );
	level._effect[ "brick" ]				 = loadfx( "explosions/grenadeExp_concrete_1" );
	level._effect[ "coolaidmanbrick" ]		 = loadfx( "explosions/grenadeExp_concrete_1" );
	level._effect[ "rain_heavy_mist" ]		 = loadfx( "weather/rain_mp_farm" );
	level._effect[ "lightning" ]			 = loadfx( "weather/lightning_mp_farm" );
	level._effect[ "cgoshp_drips_a" ]		 = loadfx( "misc/cgoshp_drips_a" );

	//ambient runners
	level._effect[ "rain_splash_mp_farm" ]	 = loadfx( "ambient_runners/mp_farm_rain_splash01" );
	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_tubrok_fx::main();
#/		
}

3:in the same directory (C:\Program Files\Activision\Call of Duty 4 - Modern Warfare\raw\maps\mp)
make a new Folder called: CREATEFX,then inside that folder open notepad and make a file called
mp_yourmap.fx (NOTE This is a 2nd FX file that is required)save it in this Folder(CREATEFX only) not
in you main GSC folder.
Put the following details into the created file.

Code: Select all

ent = maps\mp\_utility::createOneshotEffect( "rain_heavy_mist" );
   ent.v[ "origin" ] = ( 3232.0, 3160.0, 900 );
   ent.v[ "angles" ] = ( 270, 276, 0 );
   ent.v[ "fxid" ] = "rain_heavy_mist";
   ent.v[ "delay" ] = -1;


ent = maps\mp\_utility::createOneshotEffect( "lightning" );
   ent.v[ "origin" ] = ( 3288.0, 3100.0, 624 );
   ent.v[ "angles" ] = ( 270, 276, 0 );
   ent.v[ "fxid" ] = "lightning";
   ent.v[ "delay" ] = -1;

Save and close file, in the CreateFX folder.

Open radiant & your compiler and do a full compile..
Compile BPS. Compile Refelections, Build ZoneFileThe do step 5

Lastly, no:5
5: in your Compiler. open up you update zone-file button and add the following to your ZoneFile

Code: Select all

fx,ambient_runners/mp_cargoship_rain_noise01
fx,ambient_runners/mp_cargoship_rain_noise02
fx,ambient_runners/mp_cargoship_rain_noise03
fx,ambient_runners/mp_cargoship_rain_noise04
fx,ambient_runners/mp_cargoship_rain_noise_ud01
fx,ambient_runners/mp_cargoship_rain_noise_ud02
fx,ambient_runners/mp_cargoship_rain_noise_ud03
fx,ambient_runners/mp_cargoship_rain_noise05
fx,weather/rain_mp_farm
fx,weather/lightning_mp_farm
fx,misc/cgoshp_drips
fx,misc/cgoshp_drips_a

Save your update zone file then re-run the Build-Fast-File again.
Start map, then hopefully you should have Rain/Thunder/Lightning.

This is all i have in mine and it works.. if it dont work then you have done somethink wrong.



Final Results should be like this.

http://www.youtube.com/watch?v=Bbk-qsLoe6Q
LArger Screen version.
http://www.youtube.com/swf/l.swf?video_ ... S7FLdDVuh4

---------------------------------------------------------------------------------------

Tutorial by ManicKiller/SteveUK

Re: How to add Rain/Thunder & Lightning to your Maps.

Posted: March 5th, 2008, 3:47 pm
by Pedsdude
I edited it so that the scripting is in code tags. Nice tutorial, much appreciated! :)

Re: How to add Rain/Thunder & Lightning to your Maps.

Posted: March 5th, 2008, 6:36 pm
by steveuk
Pedsdude wrote:I edited it so that the scripting is in code tags. Nice tutorial, much appreciated! :)
:D k no problems.. Ya welcome

Re: How to add Rain/Thunder & Lightning to your Maps.

Posted: March 5th, 2008, 6:54 pm
by steveuk
here's a cut down version from Zeroy on IW Forums, NOT TESTED, but his normaly work..

Here is the cut down version:

1: 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:

Code: Select all

Code:maps\mp\mp_yourmap_fx::main();   
2: 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)

Code: Select all

Code: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();
#/      
}
3: Go in the directory "C:\Program Files\Activision\Call of Duty 4 - Modern Warfare\raw\maps\"
make a new Folder called: createfx ,then inside that folder open notepad and make a file called
mp_yourmap_fx.gsc

Put the following into the created file:

Code: Select all

Code: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.

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

Code: Select all

fx,weather/rain_mp_farm
fx,weather/lightning_mp_farm
thats it, well if i hadnt tried i doubt this version would'nt of been added.

Steve

Re: How to add Rain/Thunder & Lightning to your Maps.

Posted: January 21st, 2011, 2:46 pm
by TTTT
i tried this and it works but there one mistake in the 1st tut. (2nd one didnt work)

the cratefx folder shoulld not be in maps/mp/, it shoulld just be in maps/.

with this 'lil change it worked for me

ty for tut

Re: How to add Rain/Thunder & Lightning to your Maps.

Posted: January 21st, 2011, 10:49 pm
by Pedsdude
Thank you for letting us know :)

Re: How to add Rain/Thunder & Lightning to your Maps.

Posted: June 8th, 2011, 1:04 pm
by XeloX
I tried this, ended up going with a different tutorial/approach but what i am wondering about is why is the ambient sound not being called on? or did you forget to submit the mp_mapname.csv file with this tutorial?

Re: How to add Rain/Thunder & Lightning to your Maps.

Posted: June 8th, 2011, 7:20 pm
by Drofder2004
Its Steve, there probably a lot more than a csv missing here. :P

Re: How to add Rain/Thunder & Lightning to your Maps.

Posted: March 14th, 2012, 3:36 pm
by HarpAttack
NOTE: you may have to edit the figures, 2548,0,27000,0,1100), 3) ect to your own map referance Grids.

How do I find out the numbers to make it rain all over my map?

Re: How to add Rain/Thunder & Lightning to your Maps.

Posted: March 14th, 2012, 4:31 pm
by Goro92
HarpAttack wrote:NOTE: you may have to edit the figures, 2548,0,27000,0,1100), 3) ect to your own map referance Grids.

How do I find out the numbers to make it rain all over my map?

ehm... it's not hard...

if you know that the radius is about 2500*2000 ...

(2548.0,27000.0,1100) ---> (X,Y,Z)

X,Y,Z corresponds to the coordinate of the origin of the rain FX

Re: How to add Rain/Thunder & Lightning to your Maps.

Posted: March 14th, 2012, 8:08 pm
by HarpAttack
My map is from top view in radiant 2560 to -2560 L to R and 2880 to -2880 T to B how do I make it rain the full radious to the 0 deck from 640 height?

Re: How to add Rain/Thunder & Lightning to your Maps.

Posted: March 14th, 2012, 9:58 pm
by kingXrated
HarpAttack wrote:My map is from top view in radiant 2560 to -2560 L to R and 2880 to -2880 T to B how do I make it rain the full radious to the 0 deck from 640 height?
I am having the same issues as you :(

Re: How to add Rain/Thunder & Lightning to your Maps.

Posted: March 14th, 2012, 10:25 pm
by kingXrated
kingXrated wrote:
HarpAttack wrote:My map is from top view in radiant 2560 to -2560 L to R and 2880 to -2880 T to B how do I make it rain the full radious to the 0 deck from 640 height?
I am having the same issues as you :(
Never mind got it working :D

Re: How to add Rain/Thunder & Lightning to your Maps.

Posted: March 15th, 2012, 12:57 am
by HarpAttack
I can get rain to work but only in a small area. How did you get your whole map coverd?