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

Members Online

»
0 Active | 5 Guests
Online:

LATEST FORUM THREADS

»
warfare
CoD4 Map + Mod Releases
Voting menu on maps
CoD+UO General
Hauling 911
CoDBO3 General

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
Page
Next Page
subscribe
Author Topic: Fire and Sound
TheArmy
General Member
Since: Jun 24, 2006
Posts: 599
Last: Dec 25, 2009
[view latest posts]
Level 6
Category: CoD2 Scripting
Posted: Monday, Aug. 6, 2007 07:01 am
In my map I have fire. When someone is killed by it I want a custom sound to play throughout the map. I have 5 custom sounds that I want to be played in .wav formats. Is there a way to set up a rotation with these sounds? How do I get the sound to play upon a players death by fire?
Share |
The_Caretaker
General Member
Since: Jun 8, 2004
Posts: 11625
Last: Jul 7, 2009
[view latest posts]
Level 10
Category: CoD2 Scripting
Posted: Monday, Aug. 6, 2007 06:40 pm
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

Give them all the same name, then give all 5 a different sequence number 1 through 5. That way coD should randomly pick one of the 5 files.

The death of a player is caused by a trigger_hurt so maybe try using that as the trigger in your script
Share |
TheArmy
General Member
Since: Jun 24, 2006
Posts: 599
Last: Dec 25, 2009
[view latest posts]
Level 6
Category: CoD2 Scripting
Posted: Monday, Aug. 6, 2007 06:52 pm
Let me start out by saying thank you so much for all your help so far. It's really great that you and others here at modsonline.com give so much help to everyone. I have some questions though b/c if you remember I suck at scripting and I am sry about that.

1) Of my 5 sound files 3 of them are .wav files and 2 are .mp3 files. Does it matter?

2) The sound files are called scream1, scream2, etc until scream5. This is what my .csv file currentyy looks like:
Code:

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

null,,null.wav,,,,,,,,,,,,,,,,,,,

#Ambiance,,,,,,,,,,,,,,,,,,,,,,,

ambient_mp_skyscraper,,ambient/amb_russia03_ext.mp3,0.5,,ambience,,,,,local,streamed,,looping,,mp_skyscraper,,,,,,ambience

#Level Specific,,,,,,,,,,,,,,,

,stuka_flyby,,vehicles/stuka_by02.wav,1.25,,,,100000,,,,,,,,

,this is a stock sound in Cod2 try this one
stuka_flyby,,vehicles/mrk_airplane_drone3b_loop.wav,0.75,,na,0.4,0.7,50,5000,auto,,,looping,,mp_skyscraper


Specifically, how do I edit this script?

3) What directory do the 5 sound files get placed?

4) More specifically please, how do I use the trigger_hurt in my script?

edited on Aug. 6, 2007 02:53 pm by TheArmy

edited on Aug. 6, 2007 02:54 pm by TheArmy
Share |
The_Caretaker
General Member
Since: Jun 8, 2004
Posts: 11625
Last: Jul 7, 2009
[view latest posts]
Level 10
Category: CoD2 Scripting
Posted: Monday, Aug. 6, 2007 06:58 pm
1) It shouldn't.

2) Just add five lines to your .csv file, with the correct code for your scream1 through 5 files...

Code:
scream,1,misc/scream1.wav,0.75,,na,0.4,0.7,50,5000,auto,,,looping,,mp_skyscraper

for instance.

3) In this case the file scream1.wav should go in the sounds/maic folder.

4) Just like any other trigger.

Share |
TheArmy
General Member
Since: Jun 24, 2006
Posts: 599
Last: Dec 25, 2009
[view latest posts]
Level 6
Category: CoD2 Scripting
Posted: Monday, Aug. 6, 2007 07:15 pm
maic folder?
Share |
The_Caretaker
General Member
Since: Jun 8, 2004
Posts: 11625
Last: Jul 7, 2009
[view latest posts]
Level 10
Category: CoD2 Scripting
Posted: Monday, Aug. 6, 2007 07:16 pm
misc...just like it said in the .csv file...
Share |
TheArmy
General Member
Since: Jun 24, 2006
Posts: 599
Last: Dec 25, 2009
[view latest posts]
Level 6
Category: CoD2 Scripting
Posted: Monday, Aug. 6, 2007 07:33 pm
1) ok the 5 sound files are now in this directory:
mp_mymapname/sound/misc
is this right?

2) This is my csv file now. Is it right?

Code:
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

null,,null.wav,,,,,,,,,,,,,,,,,,,

#Ambiance,,,,,,,,,,,,,,,,,,,,,,,

ambient_mp_skyscraper,,ambient/amb_russia03_ext.mp3,0.5,,ambience,,,,,local,streamed,,looping,,mp_skyscraper,,,,,,ambience

#Level Specific,,,,,,,,,,,,,,,

,stuka_flyby,,vehicles/stuka_by02.wav,1.25,,,,100000,,,,,,,,

,this is a stock sound in Cod2 try this one
stuka_flyby,,vehicles/mrk_airplane_drone3b_loop.wav,0.75,,na,0.4,0.7,50,5000,auto,,,looping,,mp_skyscraper

scream,1,misc/scream1.wav,0.75,,na,0.4,0.7,50,5000,auto,,,looping,,mp_skyscraper
scream,2,misc/scream1.wav,0.75,,na,0.4,0.7,50,5000,auto,,,looping,,mp_skyscraper
scream,3,misc/scream1.wav,0.75,,na,0.4,0.7,50,5000,auto,,,looping,,mp_skyscraper
scream,4,misc/scream1.wav,0.75,,na,0.4,0.7,50,5000,auto,,,looping,,mp_skyscraper
scream,5,misc/scream1.wav,0.75,,na,0.4,0.7,50,5000,auto,,,looping,,mp_skyscraper
Share |
The_Caretaker
General Member
Since: Jun 8, 2004
Posts: 11625
Last: Jul 7, 2009
[view latest posts]
Level 10
Category: CoD2 Scripting
Posted: Monday, Aug. 6, 2007 07:37 pm
if it works it's right..


THe easiest way to see if something is right is not asking here.. it's trying it out yourself.

play the scream sound in your map.. if you can hear it.. it works.. if not.. something is wrong.
Share |
TheArmy
General Member
Since: Jun 24, 2006
Posts: 599
Last: Dec 25, 2009
[view latest posts]
Level 6
Category: CoD2 Scripting
Posted: Monday, Aug. 6, 2007 07:42 pm
well i was just asking because I am not ready to test. as of now I am positive it wont work because I havent scripted the trigger_hurt. I have the trigger_hurt in my map, but I don't know how to script it so when it kills a player one of the 5 sounds will play throughout the map. Do I script it in the .gsc file, the fx_gsc file? What code do I use?
Share |
The_Caretaker
General Member
Since: Jun 8, 2004
Posts: 11625
Last: Jul 7, 2009
[view latest posts]
Level 10
Category: CoD2 Scripting
Posted: Monday, Aug. 6, 2007 07:46 pm
to test if it works, just add a script_model, give it a targetname and use it to play the sound.. no need to trigger it or anything.

It's just a test to see if that part works..

If you script everything at once, it's very hard to figure out what's wrong... make a small part, test it, if it works, continue.

The same goes for mapping.. you don't make your whole map at once and then test it.. because there would be too much to fix.. you add a small part, compile and test to see if it's ok.. then continue with another part of your map.
Share |
Restricted Access Topic is Locked
Page
Next Page
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

»