Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds

Members Online

»
0 Active | 67 Guests
Online:

LATEST FORUM THREADS

»
CoD: Battle Royale
CoD+UO Map + Mod Releases
Damaged .pk3's
CoD Mapping
heli to attack ai
CoD4 SP Mapping

Forums

»

Welcome to the MODSonline.com forums. Looking for Frequently Asked Questions? Check out our FAQs section or search it out using the SEARCH link below. If you are new here, you may want to check out our rules and this great user's guide to the forums and the website.
For more mapping and modding information, see our Wiki: MODSonWiki.com

Jump To:
Forum: All Forums : Call of Duty 4
Category: CoD4 MP Mapping
CoD 4 mapping and level design for multiplayer.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername, novemberdobby
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked
Page
Next Page
subscribe
Author Topic: Level Effects
JerryAtricks
General Member
Since: Jun 1, 2008
Posts: 108
Last: Nov 20, 2010
[view latest posts]
Level 4
Category: CoD4 MP Mapping
Posted: Friday, Nov. 5, 2010 12:51 am
I'm trying to get effects working in my map with no luck. I'm trying to add fog and get weather/cloud_bank to work. I tried the barrel fire tutorial without any luck as that shows you how to do localized effects and has a bunch of code that doesn't pertain to what I'm trying to do. The effects I'm trying to get to work cover the entire level, not just a small area.

Thanks.


PS...
If you don't have a solution to my issue, please do not post here.
Thanks again.
Share |
Xylozi
General Member
Since: Jul 12, 2008
Posts: 218
Last: Mar 1, 2012
[view latest posts]
Level 4
Im a fan of MODSonair
Category: CoD4 MP Mapping
Posted: Friday, Nov. 5, 2010 07:27 am
Here is a short tutorial on how to add some effects to your map:

1. In your mp_mapname.gsc, add this line just after the first brace:

Code:
maps\mp\mp_mapname_fx::main();


2. Create a file called: mp_mapname_fx.gsc in your maps\mp\ folder. Add this code and modify it to your needs:

Code:

main()
{
	// change "folder/file" to the path to your fx
	// for more than one, copy and paste it and change the name and path
	level._effect[ "fog" ] = loadFX( "folder/file" );

	// change mp_mapname_fx to your map's name
	if ( getdvar( "clientSideEffects" ) != "1" )
		maps\createfx\mp_mapname_fx::main();
}


3. Now you need to create a file called mp_mapname_fx.gsc in the maps\createfx\ folder. Add and modify this code:

Code:

//_createfx generated. Do not touch!!
main()
{
	ent = maps\mp\_utility::createOneshotEffect( "fog_river_200" ); //OneshotEffect can be replaced by LoopEffect
	ent.v[ "origin" ] = ( 946, -3376, 102 ); 
	ent.v[ "angles" ] = ( 270, 26.5649, -26.565 ); 
	ent.v[ "fxid" ] = "river_fog"; 
	ent.v[ "delay" ] = -1; 

	ent = maps\mp\_utility::createOneshotEffect( "file" ); 	//change file to the name of the efx
	ent.v[ "origin" ] = ( -152, -2092, 102 ); 				// change this to the origin of your effect
	ent.v[ "angles" ] = ( 270, 26.5649, -26.565 );			// Set angles for the effect
	ent.v[ "fxid" ] = "river_fog";							// unique ID for the fx
	ent.v[ "delay" ] = -1;									// delay between each call if it is looping
	
	// for more than two, copy and paste the above five lines and modify
}


4. Finally, open your mp_mapname.csv in your zone_source folder. Add lines for each FX you want to use:

Code:
fx,folder/file


Replace folder/file with the path of the effect.

edited on Nov. 5, 2010 03:28 am by Xylozi
Share |
JerryAtricks
General Member
Since: Jun 1, 2008
Posts: 108
Last: Nov 20, 2010
[view latest posts]
Level 4
Category: CoD4 MP Mapping
Posted: Friday, Nov. 5, 2010 08:10 am
Thanks Xylozi, but now I'm getting this error when I run the map:

Could not find script ',aps\mp\mp_mymapname_fx'
maps\mp\mp_mymapname_fx::main()


The mp_mapname_fx.gsc file is in there. So why doesn't it see it?
Share |
cskiller86
General Member
Since: Nov 23, 2009
Posts: 528
Last: Oct 25, 2011
[view latest posts]
Level 6
Category: CoD4 MP Mapping
Posted: Friday, Nov. 5, 2010 08:21 am
You'll also have to add this line to your zone file
Code:
rawfile,maps\mp\mp_mapname_fx.gsc
Share |
JerryAtricks
General Member
Since: Jun 1, 2008
Posts: 108
Last: Nov 20, 2010
[view latest posts]
Level 4
Category: CoD4 MP Mapping
Posted: Friday, Nov. 5, 2010 08:42 pm
Same error, cskiller86. [ohwell]
Share |
JerryAtricks
General Member
Since: Jun 1, 2008
Posts: 108
Last: Nov 20, 2010
[view latest posts]
Level 4
Category: CoD4 MP Mapping
Posted: Friday, Nov. 5, 2010 08:54 pm
Here are my .gsc, and .csv files. I'm sure it's one small thing that I'm missing.

These files are in raw/maps/mp
mp_mapname.gsc
Code:
main() { maps\mp\_load::main(); maps\mp\mp_mapname_fx::main(); maps\mp\_explosive_barrels::main(); }


mp_mapname_fx.gsc
Code:
//_createfx generated. Do not touch!! main() { 
level._effect[ "weather" ] = loadFX( "weather\cloud_bank" ); if ( getdvar( "clientSideEffects" ) != "1" ) maps\createfx\mp_mapname_fx::main(); }


This file is in raw/maps/createfx
Code:
//_createfx generated. Do not touch!! main() { ent = maps\mp\_utility::createLoopEffect( "cloud_bank" ); ent.v[ "origin" ] = ( 0, 0, 0 ); ent.v[ "angles" ] = ( 270, 26.5649, -26.565 ); ent.v[ "fxid" ] = "cloud_bank"; ent.v[ "delay" ] = -1; ent = maps\mp\_utility::createOneshotEffect( "cloud_bank" ); ent.v[ "origin" ] = ( 0, 0, 0 ); ent.v[ "angles" ] = ( 270, 26.5649, -26.565 ); ent.v[ "fxid" ] = "cloud_bank"; ent.v[ "delay" ] = -1; }


This file is the .csv in zone_source: mp_mapname.csv
Code:
ignore,code_post_gfx_mp ignore,common_mp ignore,localized_code_post_gfx_mp ignore,localized_common_mp col_map_mp,maps/mp/mp_mapname.d3dbsp rawfile,maps/mp/mp_mapname.gsc impactfx,mp_mapname sound,common,mp_mapname,!all_mp sound,generic,mp_mapname,!all_mp sound,voiceovers,mp_mapname,!all_mp sound,multiplayer,mp_mapname,!all_mp weapon,sp/mp5_silencer xmodel,viewhands_black_kit weapon,sp/mp5_silencer xmodel,viewhands_black_kit rawfile,maps/mp/_explosive_barrels.gsc xmodel,com_barrel_piece xmodel,com_barrel_piece2 fx,props/barrel_ignite fx,props/barrel_fire_top fx,weather/cloud_bank rawfile,maps\mp\mp_mapname_fx.gsc


This is also in zone_source: mp_mapname_load.csv (don't know if it's relevant)
Code:
ignore,code_post_gfx_mp ignore,common_mp ignore,localized_code_post_gfx_mp ignore,localized_common_mp ui_map,maps/mp_mapname.csv
Share |
Efraxskills
General Member
Since: Nov 10, 2009
Posts: 41
Last: Nov 22, 2012
[view latest posts]
Level 2
Category: CoD4 MP Mapping
Posted: Saturday, Nov. 6, 2010 02:31 am
you miss this line of code in your zone_source/mp_mapname.csv:

Code:
rawfile,maps\createfx\mp_mapname_fx.gsc


and this in your mapname.gsc:

Code:
main()

{
	
        maps\mp\_load::main();	
        maps\mp\mp_mapname_fx::main();
        maps\createfx\mp_mapname_fx::main():
        maps\mp\_explosive_barrels::main();

       // map stuff here.

}



and finally in your createfx/mp_mapname_fx.gsc:

Code:
//_createfx generated. Do not touch!!

main()

{


// cloud bank

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

}


origin is the coordinates for placing fx, no angles.

i hope this help you.
Share |
JerryAtricks
General Member
Since: Jun 1, 2008
Posts: 108
Last: Nov 20, 2010
[view latest posts]
Level 4
Category: CoD4 MP Mapping
Posted: Saturday, Nov. 6, 2010 06:12 am
Alright, finally getting down to it.

Map compiles fine, map loads fine - only problem is that the effects are showing sprites that say Missing FX on them.

What's that all about?
Share |
cskiller86
General Member
Since: Nov 23, 2009
Posts: 528
Last: Oct 25, 2011
[view latest posts]
Level 6
Category: CoD4 MP Mapping
Posted: Saturday, Nov. 6, 2010 09:23 am
Well, any time you have missing assets in the game, you'll have to re-update the zone file, and then copy the missing assets from the left column to the right one.
Or just add the FX manually, like this
Code:
fx,props/car_glass_large
where you would replace props/car_glass_large with the FX you're using.
Share |
JerryAtricks
General Member
Since: Jun 1, 2008
Posts: 108
Last: Nov 20, 2010
[view latest posts]
Level 4
Category: CoD4 MP Mapping
Posted: Saturday, Nov. 6, 2010 10:59 am
There are no missing assets in the left column. The only thing that shows up there are some files from another map I was working on. ???

rawfile,maps/mp/mp_house2_2blks.gsc
rawfile,vision/mp_house2_2blks.vision
rawfile,maps/mp/mp_house2_2blks_fx.gsc
rawfile,maps/createfx/mp_house2_2blks_fx.gsc


In fact, house2 was just a prefab I was working on. So why is it looking for it in my new map?

I tried manually inputting the files myself into the zone file but it still doesn't work. ???

fx,weather\cloud_bank_a
fx,smoke\amb_smoke_add
fx,smoke\amb_dust


Those are the three fx that are missing, but when added to the zone file, they still don't work. [banghead]

Does it matter which way the slashes go? I noticed you have them as forward slashes, while I have them as backslashes. Does that matter?
Share |
Restricted Access Topic is Locked
Page
Next Page
subscribe
MODSonline.com Forums : Call of Duty 4 : CoD4 MP Mapping

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»