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

Members Online

»
0 Active | 95 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 2
Category: CoD2 Scripting
Scripting and coding with Call of Duty 2.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: Sound???
viraj_mantri
General Member
Since: Nov 15, 2006
Posts: 66
Last: May 16, 2007
[view latest posts]
Level 3
Category: CoD2 Scripting
Posted: Wednesday, Apr. 11, 2007 06:34 pm
hi, i wish to add my own new sound track in cod2 mp level within a iwd file,can any one pls tel me how should i incorporate my own newsound track which is not in any either of cod2 iwd files (from 0 to 14).is it possible to add my own sound in cod2 mp level?? or it is restricted to use the same wav files which r already there.pls help???
Share |
The_Caretaker
General Member
Since: Jun 8, 2004
Posts: 11625
Last: Jul 7, 2009
[view latest posts]
Level 10
Category: CoD2 Scripting
Posted: Wednesday, Apr. 11, 2007 06:53 pm
you can do the same as in the ambient tutorial in the CoD2 tutorial section, but just make the .csv file point to your own ambient track instead of one of the stock ones.

Place your ambient track in the same folder as the stock ones (sound/ambient) in your own .iwd file, along with your map, .csv file etc.. and you should be good to go.
Share |
Marlow
General Member
Since: Jun 27, 2006
Posts: 150
Last: Mar 6, 2008
[view latest posts]
Level 4
Category: CoD2 Scripting
Posted: Wednesday, Apr. 11, 2007 06:59 pm
Read these

http://www.modsonline.com/Tutorials-read-313.html
http://www.modsonline.com/Tutorials-read-366.html
http://www.modsonline.com/Forums-top-61819-.html%23569306
http://www.modsonline.com/Forums-top-21656-.html%23119981
http://www.modsonline.com/Forums-top-20353-.html%23112789

Hope this helped...
Share |
viraj_mantri
General Member
Since: Nov 15, 2006
Posts: 66
Last: May 16, 2007
[view latest posts]
Level 3
Category: CoD2 Scripting
Posted: Thursday, Apr. 12, 2007 04:12 pm
hello friend,i refered the given tuts but still i cant hear my own sound track.... i made two folder sound & soundaliaes and then i placed a proper csv file in Soundaliase folder and a sub folder named custom in sound folder and then wav file in it, but still i can only hear only those sound which r given by cod but not the one which i hav incorporated in custom folder.
can i kno is there any different thing to do in csv or any where else in order to get my own sound played when triggered ??? pls help me

as i succeded in ambience but not in triggered pls help??

edited on Apr. 12, 2007 12:15 pm by viraj_mantri
Share |
The_Caretaker
General Member
Since: Jun 8, 2004
Posts: 11625
Last: Jul 7, 2009
[view latest posts]
Level 10
Category: CoD2 Scripting
Posted: Thursday, Apr. 12, 2007 04:51 pm
post your script and .csv file please.
Share |
viraj_mantri
General Member
Since: Nov 15, 2006
Posts: 66
Last: May 16, 2007
[view latest posts]
Level 3
Category: CoD2 Scripting
Posted: Friday, Apr. 13, 2007 06:09 am
my csv 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

#Ambiance,,,,,,,,,,,,,,,,,,,,,,,
ambient_sound_tut,,misc/ambient_sound_tut.mp3,0.4,,,,,,,local,streamed,,looping,,mp_volume,,,,,,,,
sound2,,misc/sound2.wav,1,,,,,150,300,auto,,,nonlooping,,,,,,,,,,
sound3,,misc/sound3.wav,1,,,,,500,500,auto,,,nonlooping,,,,,,,,,,
sound4,,misc/sound4.wav,1,,,,,150,300,auto,,,nonlooping,,,,,,,,,,
sound5,,misc/sound5.wav,1,,,,,150,300,auto,,,nonlooping,,,,,,,,,,

___________________________________________________
my .gsc file


main()
{

maps\mp\_load::main();

ambientPlay("ambient_sound_tut");

thread sound2();

thread sound3();

thread sound4();

thread sound5();

}

sound2()
{
yellsoundtrig = getent ("sound2_trigger","targetname");
while(1)
{
yellsoundtrig waittill ("trigger");

alert = getent ("sound2source", "targetname");
alert playsound("sound2");
wait (13.8);
}

}

sound3()
{
yellsoundtrig = getent ("sound3_trigger","targetname");
yellsoundtrig waittill ("trigger");

alert = getent ("sound3source", "targetname");
alert playsound("sound3");
wait (13.8);

}

sound4()
{
yellsoundtrig = getent ("sound4_trigger","targetname");
yellsoundtrig waittill ("trigger");

alert = getent ("sound4source", "targetname");
alert playsound("sound4");
wait (3.8);

}
sound5()
{
yellsoundtrig = getent ("sound5_trigger","targetname");
while(1)
{
yellsoundtrig waittill ("trigger");

alert = getent ("sound5source", "targetname");
alert playsound("sound5");
wait (13.8);
}

}
___________________________________________________
above in the csv file sound5.wav is my own sound track not the cod's.
just help me to resolve my problem
Share |
OLD_MAN_WITH_GUN
General Member
Since: May 13, 2006
Posts: 754
Last: Jan 23, 2010
[view latest posts]
Level 7
Category: CoD2 Scripting
Posted: Friday, Apr. 13, 2007 12:38 pm
Two things.
1st: you have to put the correct folder structure into your csv file.
You said your wave files are in a folder called 'custom' (which is in the folder sound), but in your csv file you wrote 'misc' (so you typed in a wrong place the game searches for the wave files).
2nd: To play sounds via playsound you have to alias them first (this was made in a mp_yourmapname_fx.gsc file).
So the mp_yourmapname_fx.gsc in your case could be look like this
Quote:
main()
{
precacheFX();
ambientFX();
level.scr_sound["sound2"] = "sound2";
level.scr_sound["sound3"] = "sound3";
level.scr_sound["sound4"] = "sound4";
level.scr_sound["sound5"] = "sound5";
}
precacheFX()
{
}

ambientFX()
{
}
You also have to call this mp_yourmapname_fx.gsc from you map.gsc. For this add the following line to your mp_yourmapname.gsc
Quote:
maps\mp\mp_yourmapname_fx::main();

Place this line above the line maps\mp\_load::main();



edited on Apr. 13, 2007 08:40 am by OLD_MAN_WITH_GUN
Share |
viraj_mantri
General Member
Since: Nov 15, 2006
Posts: 66
Last: May 16, 2007
[view latest posts]
Level 3
Category: CoD2 Scripting
Posted: Monday, Apr. 23, 2007 08:29 am
hi friend, i m still stuck with adding my own sound track...using trigger. i refered ur given code,pls let me know in above function ambientFX() do i need to write any thing in it or just to keep it as it is.I also wanna know that,since alias for sound track is already made in .csv file then why do v write here as level.scr_sound["sound5"] = "sound5"; what xactly do this code does.and is there any thing else to be done to play my own sound when trigger is activated???pls help me

edited on Apr. 23, 2007 04:31 am by viraj_mantri

edited on Apr. 23, 2007 04:33 am by viraj_mantri
Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : Call of Duty 2 : CoD2 Scripting

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

»