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

Members Online

»
0 Active | 83 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
Category: CoD Mapping
CoD mapping and level design.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked
Page
Next Page
subscribe
Author Topic: adding sounds
Grimley
General Member
Since: Aug 5, 2003
Posts: 45
Last: Apr 9, 2008
[view latest posts]
Level 2
Category: CoD Mapping
Posted: Tuesday, Dec. 2, 2003 02:22 pm
Hi all, gj on CoD tuts btw...

I have started on a map and added a tank and I wanted the noise of the tank to go with it...any ideas how to add sound, ive extracted the sound folder the same way as xmodels folder but theres no target_speaker so I don't know which entity to use.
Share |
foyleman
Preferred PLUS Member
Since: Nov 7, 2001
Posts: 95766
Last: May 10, 2024
[view latest posts]
Level 10
Admin
Forum Moderator
Im a fan of MODSonair
Im a HOST of MODSonair
Category: CoD Mapping
Posted: Wednesday, Dec. 3, 2003 12:46 pm
Did you figure it out yet?
Go ahead... You Play I Mod : Support Modsonline by becoming a PREFERRED MEMBER today!
Have you heard the MODSonair Podcast?:
MODSonair is a weekly podcast bringing you the news from a modders perspective.
Tune in every Sunday at 12pm EST to listen LIVE.
Quake 4 Mods for Dummies - Half-Life 2 Mods for Dummies
Share |
Shoot
General Member
Since: Jun 22, 2002
Posts: 260
Last: Mar 22, 2008
[view latest posts]
Level 5
Category: CoD Mapping
Posted: Wednesday, Dec. 3, 2003 10:08 pm
I have spent a little time at it and need to try again. I even created a target_speaker Icon but to no avail. It seems that all the sounds in the SP are scripted and are in the _sounds.gsc file in the maps folder of the pak files.

For example - the sound for the radio in the POW camp is scripted in that file as follows:
Code:
	if (level.script == "powcamp")
{

maps_fx::loopSound("german_radio", (-1973, 4260, -7), 60.27);

}



I know there is a lot more to it than that - but this may help.
The ambient sound is done from the gsc file so why not the sounds in the map.
the _fx.gsc describes a lot of the fx scripting also.
I am on to how they are putting this together - hope to have a demo tonight. This is all depending upon that this works in MP.
Share |
Shoot
General Member
Since: Jun 22, 2002
Posts: 260
Last: Mar 22, 2008
[view latest posts]
Level 5
Category: CoD Mapping
Posted: Friday, Dec. 5, 2003 02:13 am
Ok here is what I have found so far:
First off there are no sounds other than the ambient key in the gsc files for the mp stock cod maps so they were a bust as far as info.

I found lots of scripted sound and have a good line on how they do it in the single player maps but I have to test it now in a mp setting. I find it funny that there are no sounds in those maps. None.

Will get back to you - still working on it.
Share |
foyleman
Preferred PLUS Member
Since: Nov 7, 2001
Posts: 95766
Last: May 10, 2024
[view latest posts]
Level 10
Admin
Forum Moderator
Im a fan of MODSonair
Im a HOST of MODSonair
Category: CoD Mapping
Posted: Friday, Dec. 5, 2003 02:55 am
I see all the wav and mp3 files, I just can't figure out how they called to them.

I noted in a dm map's gsc file they called to some ambient music. I don't think the title of the ambient music is the same as the sound file. I think it's an indirect reference to the sound file and includes the file path in the name.

argh... I couldn't figure it out.
Go ahead... You Play I Mod : Support Modsonline by becoming a PREFERRED MEMBER today!
Have you heard the MODSonair Podcast?:
MODSonair is a weekly podcast bringing you the news from a modders perspective.
Tune in every Sunday at 12pm EST to listen LIVE.
Quake 4 Mods for Dummies - Half-Life 2 Mods for Dummies
Share |
Shoot
General Member
Since: Jun 22, 2002
Posts: 260
Last: Mar 22, 2008
[view latest posts]
Level 5
Category: CoD Mapping
Posted: Friday, Dec. 5, 2003 05:00 am
I know how they are calling the sound in the sp maps - not sure if the same effect works in mp -need to test and havent had time.

In the single player portion I found clues as to the line that is calling the sound - the maps/_sound.gsc
this file has lines of script like so:
Code:
 maps_fx::loopSound("bigfire", (-4292, 544, 332), 12.07);
maps_fx::loopSound("bigfire", (-4543, 1063, 567), 12.07);



The sound is called by the maps/_fx:: command
The sound is looped
Its alias (more on this later)
Its map orgin XYZ is in the (X,Y,Z)
The last variable defines the length of the sound - assume in milliseconds

I dont know yet if this should go directly in the mybspmap.gsc or in a mybspmap_fx.gsc and have the mybspmap.gsc call on a load of the _fx.gsc (whew that was a mouthful)


The maps/_fx.gsc file defines the various methods of playing fx commands - there is another version of this in the maps/mp folder - maps/mp/_fx.gsc For example:
Code:
loopSound(sound, Pos, waittime)
{
// level thread print_org("loopSound", sound, Pos, waittime);
level thread loopSoundthread(sound, Pos, waittime);
}

loopSoundthread(sound, Pos, waittime)
{
org = spawn("script_origin", (pos));

org.origin = pos;
// println ("hello1 ", org.origin, sound);
org playLoopSound(sound);
}



This follows the same method of calling the sound in the sp file.

The sound alias - the name of the sound that the loopsound command is calling is defined in the soundaliases/iw_sound.csv
This file is a comma delimited file that can be opened and I would assume be edited in a program such as Microsoft Excel.
The sound alias listed above of bigfire is actually from the sound/fire/Fire_Big_loop02.wav
Lots of other things are defined in this file - volume min, volume max, pitch, and a whole lot of other settings I best not mess with but....I will sooner or later.

It seems you can't reference the relative path of the sound directly - at least in the script.
Well that's most of what I found - have to test some more.
Share |
foyleman
Preferred PLUS Member
Since: Nov 7, 2001
Posts: 95766
Last: May 10, 2024
[view latest posts]
Level 10
Admin
Forum Moderator
Im a fan of MODSonair
Im a HOST of MODSonair
Category: CoD Mapping
Posted: Friday, Dec. 5, 2003 01:49 pm
whoa... uhm.. they way you put all that, believe it or not, is suddenly making sense.

maps_fx::loopSound("bigfire", (-4292, 544, 332), 12.07)

loopSound is a function and it is sending the 3 values to that function:
- sound = "bigfire"
- Pos (short for position) = (-4292, 544, 332)
- waittime = 12.07 (so this is a wait time and not a play time)

loopSounds has 2 functions inside of it, but the first one is commented out and so is not being run. The second function is calling to :

level thread loopSoundthread(sound, Pos, waittime);

I don't know what level thread means. But loopSoundthread is passing along the same values that were sent to loopSound. (could have bypassed loopSound and gone right to loopSoundthread)

loopSoundthread is taking those 3 defined values and using them like:

org = spawn("script_origin", (pos));

define what the value of org is with another function called [spawn]. spawn must know what script_origin means.

org.origin = pos

a new definition which is used in the next line.... which is commented out and therefore useless. It could have been commented out itself (and should have been. I haven't looked, but I wonder how much memory all of this useless code is using up)

org playLoopSound(sound);

playLoopSound is another function that is probable actually playing the sound. I guess org is the map position where the sound will originate.

I don't know if this breakdown is helpful to anyone, but it was fun realizing that I am starting to understand it more.
Go ahead... You Play I Mod : Support Modsonline by becoming a PREFERRED MEMBER today!
Have you heard the MODSonair Podcast?:
MODSonair is a weekly podcast bringing you the news from a modders perspective.
Tune in every Sunday at 12pm EST to listen LIVE.
Quake 4 Mods for Dummies - Half-Life 2 Mods for Dummies
Share |
Shoot
General Member
Since: Jun 22, 2002
Posts: 260
Last: Mar 22, 2008
[view latest posts]
Level 5
Category: CoD Mapping
Posted: Sunday, Dec. 7, 2003 12:24 am
I hope Im not hitting a dead end here but I have just waded thru a sleu of script compile errors in console - not matter what I do I can't get it to get past the intialization of the gsc files - it doesnt like it.

I am beggining to think there is a reason that the MP maps only have ambient sound.......Never give up!!!!
Share |
Shoot
General Member
Since: Jun 22, 2002
Posts: 260
Last: Mar 22, 2008
[view latest posts]
Level 5
Category: CoD Mapping
Posted: Sunday, Dec. 7, 2003 01:51 am
Hmmmmmmm
Im trying to digest this post - take a gander if your interested.
Sound Post at .Map
Share |
foyleman
Preferred PLUS Member
Since: Nov 7, 2001
Posts: 95766
Last: May 10, 2024
[view latest posts]
Level 10
Admin
Forum Moderator
Im a fan of MODSonair
Im a HOST of MODSonair
Category: CoD Mapping
Posted: Sunday, Dec. 7, 2003 02:08 am
whew.. that is alot to comprehend all at once.

Basically the posts are saying that if you want to add custom sounds to specific entities like doors, then you have to write a script, create a file, and add a couple fields to your entity to activate it.

It's alot of work for a little sound.

I simply wanted the ability to add custom ambient sound to specific parts of the map like you can do with a target_speaker.
Go ahead... You Play I Mod : Support Modsonline by becoming a PREFERRED MEMBER today!
Have you heard the MODSonair Podcast?:
MODSonair is a weekly podcast bringing you the news from a modders perspective.
Tune in every Sunday at 12pm EST to listen LIVE.
Quake 4 Mods for Dummies - Half-Life 2 Mods for Dummies
Share |
Restricted Access Topic is Locked
Page
Next Page
subscribe
MODSonline.com Forums : Call of Duty : CoD 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

»