MODSonline
  Welcome Guest to MODSonline Home | Forums | Register | Login
Main-Menu
Home
Login
Register
Add Download
Add News
Add Tutorial *
Forums

Advertise
Affiliate Store US *
Affiliate Store UK *
Affiliate Store CA *
Angry Letter Generator
Avatar Upload
Calendar of Games
Contact
Downloads
FAQs
Forums
Member List
Member Projects
News
News Grabber *
Policy
Polls
Private Messages
Reviews
Screenshot Gallery
Search
Servers - Game
Store - Shirts *
Subscribe
Topics
Tutorials
Weblinks
Wiki *
Tutorials
CoD Mapping
CoDUO Mapping
CoD2 Mapping
CoD4 Mapping
CoDWW Mapping
CoD FAQs
HL2 Mapping
HL2 FAQs
SOF1 Mapping
Crysis Mapping
Q4 Mapping
Doom 3 Mapping
Doom 3 FAQs
UT2K3 Mapping
SOF2 Mapping
SOF2 FAQs

Lightray Modeling
General Modeling
General Modding
Adobe Photoshop
Common Mapping Errors

Readme.txt Generator
Members-Online
lazygit [Forum]
zblimp [Tutor]
COLMAC [Forum]

3 Members and 16 Guests
Chat MODSonline
0 People Now Chatting
MODSOnline TeamSpeak

download TeamSpeak

In-The-News
Monday, Dec. 1st
A message from foyleman
Sunday, Nov. 30th
MODSonair 156 Live
Friday, Nov. 28th
MODSonair Episode 155
Wednesday, Nov. 26th
MODSonair Forum Buttons
Monday, Nov. 24th
Holiday Gift Guide 2008 - PC
Latest Poll
Single or Multiplayer maps for World at War?
Single-Player 30.12%
Multiplayer 61.45%
WHAT!? The tools are out? 8.43%
Read More...
10 comments

Newsletter
Name:
Email:
Newsletter Archives
Your Membership
User Name:
Password:
Register.
In The Forums
FX help
CoD:WW Scripting.. Posts: (9) Views: (124) by COLMAC
A message from foyleman
In The News.. Posts: (8) Views: (77) by COLMAC
Weird texture problem
HL2 Level Design.. Posts: (5) Views: (30) by cz_squishy
Elevator Help
CoD 2 Level Desi.. Posts: (2) Views: (19) by luke0777
Google 468 Banner Half-Life 2 Mods for Dummies
CoDWW Download
Tutorials: CoD Mapping
Mapping and modding for Call of Duty.
Add your tutorial (registered users)

Rating:
Awful Rating Poor Rating Average Rating Good Rating Excellent Rating
Versions: You must be logged in to view history.
Adding Sound Effects
2004-07-18 21:02:09
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


All logos and trademarks and information in this site are property of MODSonline LLC © 2008.
The comments are property of their posters.
RSS news feeds for MODSonline can be found News.php.
MODSonline Subscriptions
Partners
The Firing Box
Call of Duty Headquarters
Battle for Europe COD2
XoXide
modbase.be
Frag Universe
CODAddicts - Call of Duty News & Downloads
Ask About
Advertising
Friends
Great Gamer
After Life Gaming
ModTheater
Ask About
Advertising
Link to Us
MODSonair
View in iTunes
Please help us to raise in the ranks of podcasting and subscribe to our itunes feed using the link above.
MODSonair Releases
MODSonair Episode 155
MODSonair Episode 154
MODSonair Episode 153
MODSonair Episode 152
MODSonair Episode 151
Next Show
The next MODSonair show will air LIVE on:

Time remaining:
Copyright © 2008 MODSonline
Tresware Content Management System Copyright © 2008 Tresware
Website Designed and Hosted   Tresware