Team Fortress 2

Toggle custom hitsound

Toggle custom hitsound

Toggles between default and custom hitsounds

1
2
3
4
5
alias "ding" "ding1"
alias "ding1" "tf_dingaling_wav_override player.hitbeep; echo ***custom hitsound disabled***; alias ding ding2"
alias "ding2" "tf_dingaling_wav_override "quake3.wav"; echo ***custom hitsound enabled***; alias ding ding1"
bind "f10" "ding"
ding2

Ok, I have seen scripts to toggle the hitsound on and off, but not one to change from custom to normal. If you have gotten used to using a custom hitsound like I have, losing it to a sv_pure enabled server can be annoying! The bad part is that it is just silent, it doesn't revert to the default hitsound! So, this script will toggle you between the default hitsound and your custom one! Just replace quake3.wav with the name (or filepath, if it is not in the default tf/sounds folder) of your custom hitsound. Also, you can change F10 to whatever key you wish to use. Just stick in your autoexec.cfg and you are good to go!

Oh noes! You're not a Member!

Want access to cool stuff? As a member you can:

  • Post. Give the submitter your thoughts on this Script.
  • Say Thanks. Show your appreciation by sending the submitter points.
  • Stamp Posts. Let other posters know what you think of their posts.
  • Rate. Give this Script a rating out of 10.
  • Flag. Alert moderators and warn members of a problem with this Script.
  • Vote. Vote the submitter for the Monthly Awards.
  • Subscribe. Get notified when this submitter submits again.

Interested? Register or Login

  • SomeGuy avatar
    SomeGuy Offline
    184 points Ranked 15182nd
    Member Joined 6 years ago
    Report post
    5 years ago:

    did a little tinkering with the sample rate and output bit depth, and it eventually worked! thanks!

    Why is butterscotch?
  • ChIck3n avatar
    ChIck3n Offline
    Member Joined 6 years ago
    Report post
    5 years ago:

    Ah yes. The source engine gets picky sometimes about the sample rate. You can either try to find the sound online already converted (either here or just google tf2 hitsounds), or convert it yourself. I use dbpoweramp, but you can probably use whatever audio program you know best. My current hitsound has 22KHz sample rate, and if that doesn't work try the HLDJ settings (11KHz, 16bit, and mono channel). Just play around with the converter a bit and let me know if it still doesn't work.

    Bananite
  • SomeGuy avatar
    SomeGuy Offline
    184 points Ranked 15182nd
    Member Joined 6 years ago
    Report post
    5 years ago:

    The option is on, and it is a WAV file. Here is what the console says when the sound should play: Invalid sample rate (32000) for sound 'message3.wav'

    Why is butterscotch?
  • ChIck3n avatar
    ChIck3n Offline
    Member Joined 6 years ago
    Report post
    5 years ago:

    Hmmm, do you have it enabled (eg. can you hear the default sound?)? Try entering tf_dingalingaling "1" in the console to make sure it is enabled. If it toggles between the normal sound and silence (and still prints the enabled/disabled in console), then it may be your sound file. Is it in .wav format? I don't think mp3s or other filetypes will work. If you could post some of what your console is saying when it doesn't work, that would help a lot.

    Bananite
  • SomeGuy avatar
    SomeGuy Offline
    184 points Ranked 15182nd
    Member Joined 6 years ago
    Report post
    5 years ago:

    I put my sound in the TF/sound file, changed the filename in the script, and yet it still won't work in any server, including ones I make. while I can switch between sounds, the new one still won't work. help?

    Why is butterscotch?

Share

Shareable Image:
Share banner
HTML embed code:
BB embed code:
Markdown embed code:

More embeddable images

Bookmark and Share

Credits

About this module
This module lists all those involved in the creation of this Script.
Key Authors
ChIck3n
creator

Submitter

ChIck3n avatar
ChIck3n Offline
Member Joined 6 years ago

ChIck3n
Creator

Category

About this module
This module displays this Script's category.
Other/Misc

Game

About this module
This module displays what game this Script is for.
Team Fortress 2
Team Fortress 2

Stats

Posts
5
Views
5,066
Date Added
5 years ago
Nov 13 2010 @ 6:00am UTC

Rating

About this module
This module shows the average user rating of this Script.
?
Not yet rated.

License

About this module
This module tells you what you can and cannot do with this Script.
Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 4.0 Unported License.