Team Fortress 2

Toggle custom hitsound

This is a Script for Team Fortress 2 submitted by ChIck3n.

Attention Gamer! Join GameBanana, one of the oldest mod sites, and maximize your browsing experience.

  • Subscribe: Get notified when ChIck3n submits again.
  • Say Thanks: Show your appreciation by sending ChIck3n points.
  • Post: Give ChIck3n your thoughts on this Script.
  • Vote: Help ChIck3n win the Monthly Awards.
  • Rate: Give this Script a rating out of 10.
  • Flag: Alert moderators and warn members of a problem with this Script.
  • Watch: Get notified when this Script is updated.
Mascot

Interested?

Sign up

Already a Bananite? Login

Toggle custom hitsound

Toggles between default and custom hitsounds

5 lines | 269 bytes | Raw Code
Font size:
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!
  • You must be a member

Comments

  • SomeGuy avatar
    SomeGuy Offline
    Member Joined 6 years ago
    184 points Ranked 15476th
    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
    Member Joined 6 years ago
    184 points Ranked 15476th
    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
    Member Joined 6 years ago
    184 points Ranked 15476th
    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
About this module
This module lists all those involved in the creation of this Script.

Credits

Key Authors
ChIck3n
creator

Submitter

ChIck3n avatar
ChIck3n Offline
Member Joined 6 years ago

ChIck3n
Creator
About this module
This module lets you send a private message to the submitter (ChIck3n).
About this module
This module displays what game this Script is for.

Game

About this module
This module displays this Script's category.

Category

Stats

Posts
5
Views
5,270
Date Added
5 years ago
Nov 13 2010 @ 6:00am UTC
About this module
This module shows the average user rating of this Script.

Rating

  • Not yet rated
About this module
This module tells you what you can and cannot do with this Script.

License