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

Members Online

»
0 Active | 53 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

Tutorials

»
CoD Mapping
ratings:
Awful Rating
Poor Rating
Average Rating
Good Rating
Excellent Rating
Adding Sound Effects
Versions: You must be logged in to view history.
This tutorial will explain how to add sound effects to your map.
 

Adding sound effects

Part I: Adding the trigger to your map.

This tutorial will explain how to add sound effects to your map.
What i've done is created a small sample map to demonstrate what needs to be done. Here i have the T34 tank, and i want to add an engine noise.
1. Right click in the 2D window, create a script_model.
2. Now press the "N" key to bring up the entity editor - give it this key/value set targetname/whatever
The targetname of whatever can be anything you want, this is just a label so the script knows which trigger to apply the sound to. To the best of my knowledge, you can only have one occurence of each targetname, so multiple engines, in my case, would be enginesound2, enginesound3, etc
That's all for the .bsp - save your map & compile it.

Part II: Creating the .csv file

The purpose of the .csv is to get the game to recognize your custom sound.
The recommended way of doing this is copying the .csv file from the CoD game (pak1.pk3/soundaliases/iw_sound.csv), deleting all the entries and adding your own. This is the safest way to ensure you follow the EXACT format, otherwise things won't work. You must rename it, otherwise it will override the stock file.
You'll notice the .csv file gives an explanation for what all the different options are. The pic above shows what i have used in my map. A little explanation about the columns:T34engine - this is the alias. You CANNOT have more than 1 alias of the same name, but you can use an alias more than once.
misc/tank_idle.wav - this is the path to the sound. Notice the alias is different than the actual sound file name.
the other 5 columns are volume, distance, & channel. Depending on the sound, you might want to make it louder, or make the distance at which it can be heard smaller, etc
Remember to save this under a different name, mymap.csv for example.

Part III: The .gsc files

You should already have the yourmap.gsc file - we'll come back to that in a moment. For now, you must create a new .gsc file.
This is the script that plays the sound in game.Area 1: "enginesound" - this is the targetname we gave the script_model in Radiant.
Area 2: "T34engine" - this is the alias we assigned in the .csv
Area 3: "wait" - in seconds, the delay between playing the sound again.
In a nutshell, this script tells the game to play the T34engine at the enginesound every 3 seconds. The sound file is 8 seconds, so it will sound like the tank is constantly running. It's important to recognize that the sound is coming from the trigger brush, and not the tank. I did not place the brush well, so you'll notice that the engine sound is not exactly coming from the tank - LOL - placing the brush wisely can make a world of difference ;-)
Save this gsc file - i called mine sound1.gsc
OK, now we go back to yourmap.gsc - we'll need to add the line so the new sound script will be loaded in your map.
The line i marked with the red arrow will load the sound script.

Part IV: Assemble the .pk3

Now all you got to do is put all the files into the .pk3 for your map.
the .bsp goes into the maps/mp directory
all .gsc files go into the maps/mp directory
the .csv goes into the soundaliases directory
the .wav goes into the sound/misc directory

Some things to note:

We have the alias set for the tank engine, you can use this alias as many times as you like, but for each occurence you will need to create a new trigger_multiple with a unique targetname.

For each sound that you add, you will need to create a seperate .gsc file, save it with a unique name, and update yourmap.gsc to load the new script.

Some troubleshooting that i've done - if the map loads but the sound doesn't play, check your console. If you're using a custom sound it might be corrupt or unreadable by the game, the console would tell you so. You will need to edit the file with a .wav editor (such as Nero) and increase the quality.

If COD locks up on you at the load screen, you probably made an error in the .csv - remove it from the .pk3 and check if the map will load without the .csv file. If it does, recreate the .csv

Always Always test new maps with developer set to 1 in the shortcut - if there's a script error, it will tell you, exactly, which file & which line is the culprit -- again, this will be in the console.

And finally - i hope this tutorial can help somebody. Thanks to FS_Pharaoh for making this amazing discovery and sharing the knowledge with the community. I hope this tutorial, with the images and examples, will help someone understand.

Get an example map HERE

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

»