help on custom sound

hi, im trying to play a custom sound for when the pin is pulled for the frag grenade, so there is a countdown/aural cue, ive tried editing this file

\Steam\SteamApps\SourceMods\BMS\sound\weapons\grenade\special1.wav

but when i put in my own sound it didn’t play in game… help anyone?? :S

Did you name it “special1.wav”?

Did you place it in the “…\sound\weapons\grenade…” directory?

Is the sample rate correct (44100 Hz)?


I tried editing a soundfile myself a few moments ago (the houndeye “blast1.wav” sound) and it works just fine, as long as you keep the original name.


Technically, the above “statement” is partially wrong…

You can use custom sounds, without using their original names, as long as you define said “new” names inside the script:

"weapon_frag.Special1"
{
	"channel"	"CHAN_WEAPON"
	"volume"	"VOL_NORM"
	"soundlevel" 	"SNDLVL_NORM"
	"wave"		"weapons/grenade/special1.wav"
}

Note: The code above is a section of the “game_sounds_weapons.txt” script (located in: “…\sourcemods\BMS\scripts”).


This is what an edited version of the section could look like:

"weapon_frag.Special1"
{
	"channel"	"CHAN_WEAPON"
	"volume"	"VOL_NORM"
	"soundlevel" 	"SNDLVL_NORM"
	"wave"		"weapons/grenade/specialcustom.wav"
}

Note 2: Do NOT change “weapon_frag.Special1” - it is used as an IDentifier; if you change it, the game will not play the sound file at all.


If you’re still having trouble, don’t hesitate and just ask! :wink:

this is exactly what i did… ill make the sound again and ensure it is 44100Hz… i just heard the normal sound instead of mine… maybe i made a mistake and called the one i had made special1.bkup lol thanks for the reply though

Hmm, you are doing something wrong then (don’t get me wrong). :slight_smile:

Tested 2 files and 2 files worked flawlessly, so far (I inverted both files to immediately recognize them aurally, to hear if the game loaded the custom sound(s), properly).

EDIT (10:13 PM): “inverted” was not the right word, “reversed” is what I meant.

i made a whole new sound file and it still didnt work :frowning:

edit… i must be doing something wrong… no idea what

May I ask what kind of software you are using for the editing process?

EDIT (10:25 PM): Also, if there are multiple export choices (filetypes), which do you choose?

(One that worked for me was: “WAV (Microsoft) 16-bit PCM”)

AHHH it did work, but the sound is cancelled when you throw the grenade… ill have to use the play command with a custom sound file… thanks anyway mate :slight_smile:

edit - Audacity

reply to your edit : yea likewise :stuck_out_tongue:

No problem, always trying to help! :smiley:

Have fun!

Founded in 2004, Leakfree.org became one of the first online communities dedicated to Valve’s Source engine development. It is more famously known for the formation of Black Mesa: Source under the 'Leakfree Modification Team' handle in September 2004.