Dave
11-04-2009, 10:57 PM
i noticed alot of posts concerning the weapon sounds esp smokes. all of which just suggested to edit the sound file. which is illegal. im not sure if this occured to anyone, but hl2 has its own pitch/decibel + timing sound options. so modifying source sounds could be done through code. eg its how everything gets muted after being flashed in css.
so for example adding code like
{
"dsp" "1" //active dsp, 1 being full
"dsp_volume" "0.8" //overrides the volume of DSP effects
{
"soundlevel" //decibel sound level i believe the string for this is "SNDLVL_##dB" /"_NORM" /"_NONE" the hashes being the decibel number
}
{
"volume" "0.75" //0 being none, 1 being full
{
"wave" ".wav location"
}
}
}
another setting being its attenuation (higher = softer sounds), which also requires a position for the sound which would be directed from the weapon entity or "position 0" (the first entity)
so for example
{
"dsp" "1"
"dsp_volume" "0.5"
{
"wave" "weapons/rif_ak47/boltpull.wav" // i cant remember the actuall file atm lol
"volume" "1.0"
"pitch" "85"
"position" "0"
"attenuation" "4"
"soundlevel" "SNDLVL_100dB"
}
}
i think it looks right. im not actually infront of a pc with hl2 right now. but these would be attached to where ever the sound is being called from.
this is just a suggestion :P
so for example adding code like
{
"dsp" "1" //active dsp, 1 being full
"dsp_volume" "0.8" //overrides the volume of DSP effects
{
"soundlevel" //decibel sound level i believe the string for this is "SNDLVL_##dB" /"_NORM" /"_NONE" the hashes being the decibel number
}
{
"volume" "0.75" //0 being none, 1 being full
{
"wave" ".wav location"
}
}
}
another setting being its attenuation (higher = softer sounds), which also requires a position for the sound which would be directed from the weapon entity or "position 0" (the first entity)
so for example
{
"dsp" "1"
"dsp_volume" "0.5"
{
"wave" "weapons/rif_ak47/boltpull.wav" // i cant remember the actuall file atm lol
"volume" "1.0"
"pitch" "85"
"position" "0"
"attenuation" "4"
"soundlevel" "SNDLVL_100dB"
}
}
i think it looks right. im not actually infront of a pc with hl2 right now. but these would be attached to where ever the sound is being called from.
this is just a suggestion :P