Okay, I have been struggling to implement my costum hitsound and killsound for several hours, going through several threads, and after combining 4 threads answers, I managed to find the following info's and fixes.
- Make sure the folder structure is right, like the following. D:\Steam\steamapps\common\Team Fortress 2\tf\custom\New Folder\sound\ui (in the ui folder, are your sounds.)
It can be named "New Folder" or "kjevnbewv", what ever works. (avoid spaces, it sometimes causes issues)
- Make sure the file is the correct type.
Now this one is a bit weird. It needs to be a .wav file ofcourse.
BUT ALSO!!! TF2 only likes the following Sample Rates 44100 & 22050
Helpful stuff while testing these things:
You will not have to restart your game and get a kill to test this stuff.
You can use the following commands (in the console ofcourse) and actions to make things easier.
play ui/killsound OR play ui/hitsound - This will play the current soundfile used for the game.
snd_restart - This will refresh the folder prettymuch. You put files in, while the game is running. Run this command, and then you can use the sounds without restarting.
To get things fixed I did the following:
I put the sounds in the folder, used the commands to refresh them, and play them. it gave me an error message (the Sample Rate was wrong). I then moved the sounds out of the folder, modified the sample rate to fit the desired rate. moved them back in and used "snd_restart", then "play ui/killsound" to see if it worked.
It did! and the relief of this working finally.. made me create this post, in hopes it will help others too!