Call of Duty 4: Sounds

From COD Modding & Mapping Wiki
Jump to: navigation, search
Attention 256.png
This tutorial assumes that you already know how to create, compile & create GSCs,CSVs & FastFiles for your maps
2 Techniques reviewed here:
  • Using GSCs
  • Using Radiant & Script_Origin

Using GSCs

Some sound found in raw/soundaliases/multiplayer.csv or common.csv cannot be used directly in custom because they are set for specific stock SP and MP maps, example:

Note on this example the soundalias is set to the SP map/level launchfacility_b

The solution (as long as the .wav is in the main/iw_xx.iwd) is to create your own soundaliases file. Example for added sound for uber computer sound)

1. create a file called whatever.csv under raw/soundaliases

2. Add the following in the empty file:

name,sequence,file,vol_min,vol_max,vol_mod,pitch_min,pitch_max,dist_min,dist_max,channel,type,probability,loop,masterslave,loadspec,subtitle,compression,secondaryaliasname,volumefalloffcurve,startdelay,speakermap,reverb,lfe percentage,center percentage,platform,envelop_min,envelop_max,envelop percentage

Attention 256.png
Note the change in the line from launchfacility_b to all_mp to allow for the sound in your custom map.

3. If you dont already have on, create a file in raw/maps/mp/ called mp_mapname_fx.gsc, put/add this to it:

	level.scr_sound["emt_whopper_comp"] = "emt_whopper_comp";
	if ( getdvar( "clientSideEffects" ) != "1" )

mp_mapname is your map name

4. Again, if not already there create a file under raw/maps/createfx/ called mp_mapname_fx.gsc, put/add this to it:

//_createfx generated. Do not touch!!
     	ent = maps\mp\_utility::createOneshotEffect( "light_shaft_dust_large" );
     	ent.v[ "origin" ] = (X, Y, Z);
     	ent.v[ "angles" ] = ( 270, 0, 0 );
     	ent.v[ "fxid" ] = "light_shaft_dust_large";
     	ent.v[ "delay" ] = -15;
     	ent.v[ "soundalias" ] = "emt_whopper_comp";

X, Y, Z are the coordinate of where you want the origin of the sound to come from.

5. Finally add this to your zone_source/mp_mapname.csv:


6. Compile!

--Zeroy. 14:44, 15 October 2008 (UTC)