PDA

View Full Version : Custom sounds?



wannabe
18th March 2014, 12:57
Hello!

Today I just have a question. Is it possible to add custom sounds to my map? Like is something is triggered, it makes a sound. I Know this might be a script. I know i need a sound file and "soundaliases" But is it possible to add this in the map file? Not in the mod.

So the folder will be:

maps/mp -->

mp_mapname.gsc
mp_mapname.csv
sound
soundaliases


I will post this in "scripts" forum as well.

Hope for some good answers! Cheers

Mitch
18th March 2014, 14:17
trigger PlaySound("custom_sound");

For more information see the documentation: http://znation.nl/cod4script/playsound.htm

soundaliases\mp_mapname.csv

name,sequence,file,vol_min,vol_max,vol_mod,pitch_m in,pitch_max,dist_min,dist_max,channel,type,probab ility,loop,masterslave,loadspec,subtitle,compressi on,secondaryaliasname,volumefalloffcurve,startdela y,speakermap,reverb,lfe percentage

custom_sound,,custom/custom_sound.wav,0.5,0.93,,,,7,1000,voice,streamed ,,,,all_mp
#


(maps\mp\mp_mapname.csv is for loadscreen)



,name,name of the alias that is used to play this sound (required)
,sequence,"used to uniquely identify alias entries when more than one sound goes to an alias, used only to catch unwanted duplicates (default = 0)"
,file,the name of the file that contains the sound data (required)
,vol_min,"0 is silent, 1 is full volume (default = 1)"
,vol_max,"0 is silent, 1 is full volume (default = same as vol_min)"
,vol_mod,"blank causes no effect on vol_min and vol_max, otherwise the string must match a string in the volumemodgroups.def file and the value in that file corresponding to that string will be used to adjust vol_min and vol_max, clamped to the valid range"
,pitch_min,"1 is normal playback, 2 is twice as fast, 0.5 is half as fast (default = 1)"
,pitch_max,"1 is normal playback, 2 is twice as fast, 0.5 is half as fast (default = same as pitch_min)"
,dist_min,"within this distance in inches, the sound is always full volume (default = 120)"
,dist_max,"outside this distance in inches, the sound is not started. If left blank or set to 0, the sound will play from any distance. This does not affect sound volume falloff.",,,,,,,,,,,,,,,,,,,,,
,channel,"auto, menu, weapon, voice, item, body, local, music, announcer (default = auto)",,,,,,,,,,,,,,,,,,,,,
,type,primed (a streamed sound which gets primed on some platforms) / streamed / loaded (default = loaded),,,,,,,,,,,,,,,,,,,,,
,probability,weight to use for the weighted probability of playing this sound instead of another sound (default = 1),,,,,,,,,,,,,,,,,,,,,
,loop,"whether this sound is ""looping"" or ""nonlooping"" (default = ""nonlooping"")",,,,,,,,,,,,,,,,,,,,,
,masterslave,"if ""master"", this is a master sound. If a number, then this sound's volume will be multiplied by that number (a percentage between 0 and 1) any master sound is playing. If blank, then neither master nor slave.",,,,,,,,,,,,,,,,,,,,,
,loadspec,"space-separated list of which maps should use this alias; eg, ""burnville dawnville"". If blank, the alias is used on all maps.",,,,,,,,,,,,,,,,,,,,,
,compression,"a string corresponding to an entry in ""XMAUpdate.tbl"" which is used to determine compression by XMAUpdate.exe",,,,,,,,,,,,,,,,,,,,,
,secondaryaliasname,"defined the name of an additional sound alias to play in addition to the current alias being played. Note that it is an error for the secondaryalias to also define a secondaryaliasname (eg, if B is a secondaryalias of A, B is not allowed to have its own secondaryalias).",,,,,,,,,,,,,,,,,,,,,
,volumefalloffcurve,if blank uses the linear curve which can not be changed. A string 'XXXX' corresponds to the curve defined by the file 'soundaliases/XXXX.vfcurve',,,,,,,,,,,,,,,,,,,,,
,startdelay,defaults to no delay. The value is the number of milliseconds to delay starting the sound by,,,,,,,,,,,,,,,,,,,,,
,speakermap,if blank uses the default speakermappings which cannot be changed. A string 'XXXX' corresponds to the speakermap defined by the file 'soundaliases/XXXX.spkrmap'. ,,,,,,,,,,,,,,,,,,,,,
,reverb,"blank means the alias is affected normally by wet and dry levels, ""fulldrylevel"" forces the alias to use a full drylevel (ignoring the global drylevel), ""nowetlevel"" forces the alias to use no wetlevel (ignoring the global wetlevel)",,,,,,,,,,,,,,,,,,,,,
,lfe percentage,this determines what percentage of the highest calculated spatialized speaker volume should be passed to the LFE. blank means no LFE for the sound,,,,,,,,,,,,,,,,,,,,,

wannabe
18th March 2014, 16:15
Well, it looks KIND OF complicated already, didn't expect that such :s I sure cant do this by myself. I need someone to talk to that knows this. Maybe you could help me via xFire or something, Mitch? So we don't have to wait so long between every answer. I'm not that active on this forum. Add me if you want Mitch.

xf: wannabelik3

wannabe
18th March 2014, 16:16
But i kind of understand what to do. I'll try it myself and see how it goes, then report.