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

Tutorials for Call of Duty 4 mapping

Moderator: Core Staff

Post Reply
steveuk
CJ G0D!
CJ G0D!
Posts: 1330
Joined: November 21st, 2006, 12:51 pm

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

Post by steveuk » March 5th, 2008, 7:51 am

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

Pedsdude
Site Admin
Site Admin
Posts: 15908
Joined: October 15th, 2004, 7:18 pm
Location: UK

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

Post by Pedsdude » March 5th, 2008, 3:47 pm

I edited it so that the scripting is in code tags. Nice tutorial, much appreciated! :)
Image
Image

steveuk
CJ G0D!
CJ G0D!
Posts: 1330
Joined: November 21st, 2006, 12:51 pm

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

Post by steveuk » March 5th, 2008, 6:36 pm

Pedsdude wrote:I edited it so that the scripting is in code tags. Nice tutorial, much appreciated! :)
:D k no problems.. Ya welcome

steveuk
CJ G0D!
CJ G0D!
Posts: 1330
Joined: November 21st, 2006, 12:51 pm

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

Post by steveuk » March 5th, 2008, 6:54 pm

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

TTTT
CJ Wannabe
CJ Wannabe
Posts: 30
Joined: August 16th, 2009, 5:51 am

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

Post by TTTT » January 21st, 2011, 2:46 pm

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

Pedsdude
Site Admin
Site Admin
Posts: 15908
Joined: October 15th, 2004, 7:18 pm
Location: UK

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

Post by Pedsdude » January 21st, 2011, 10:49 pm

Thank you for letting us know :)
Image
Image

User avatar
XeloX
CJ Newbie
CJ Newbie
Posts: 74
Joined: February 13th, 2010, 9:58 pm

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

Post by XeloX » June 8th, 2011, 1:04 pm

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?
Image

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13313
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

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

Post by Drofder2004 » June 8th, 2011, 7:20 pm

Its Steve, there probably a lot more than a csv missing here. :P
Image
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010

HarpAttack
CJ Wannabe
CJ Wannabe
Posts: 3
Joined: March 14th, 2012, 3:29 pm
Gamertag: M@yhem

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

Post by HarpAttack » March 14th, 2012, 3:36 pm

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?

User avatar
Goro92
CJ Spammer!
CJ Spammer!
Posts: 605
Joined: March 7th, 2011, 5:54 pm
Location: Brescia, Italy

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

Post by Goro92 » March 14th, 2012, 4:31 pm

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
Image

HarpAttack
CJ Wannabe
CJ Wannabe
Posts: 3
Joined: March 14th, 2012, 3:29 pm
Gamertag: M@yhem

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

Post by HarpAttack » March 14th, 2012, 8:08 pm

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?

kingXrated
CJ Wannabe
CJ Wannabe
Posts: 17
Joined: April 25th, 2011, 9:33 am
Gamertag: I x UnLuCkY

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

Post by kingXrated » March 14th, 2012, 9:58 pm

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

kingXrated
CJ Wannabe
CJ Wannabe
Posts: 17
Joined: April 25th, 2011, 9:33 am
Gamertag: I x UnLuCkY

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

Post by kingXrated » March 14th, 2012, 10:25 pm

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

HarpAttack
CJ Wannabe
CJ Wannabe
Posts: 3
Joined: March 14th, 2012, 3:29 pm
Gamertag: M@yhem

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

Post by HarpAttack » March 15th, 2012, 12:57 am

I can get rain to work but only in a small area. How did you get your whole map coverd?

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests