Alternating Killsounds

Yo, buddy. We are one of the oldest mod sites on the Interwebs. Sign up and maximize your browsing experience.

  • Subscribe: Get notified of new submissions like this.
  • Say Thanks: Show your appreciation by sending DrCheech points.
  • Post: Give DrCheech your thoughts on this Thread.
  • Flag: Alert moderators and warn members of a problem with this Thread.
  • Watch: Get notified when this Thread is updated.

Join the community!

Sign up

Already a Bananite? Login

So I have a set of of audio files that all follow the same theme, but they would really only work for a killsound. Is there a way to make a script that would go through a list of killsounds(for example, if I had killsound1, killsound2, killsound3 and so on) in order and alternate which one it treats as the current killsound? 

My goal is to get it to change every kill, but I wanted to ask if that's even possible. Any input is greatly appreciated. Thanks for your time.


  • 3mo
    carkad29_WAH avatar
    Member Joined 1y
    260 points Ranked 14527th
    Unfortunately I don't think that's possible, however I'm not an expert, so I don't know.
    S E E M S L E G I T
  • 3mo
    Zwip-Zwap Zapony avatar
    Zwip-Zwap Zapony avatar Offline
    Member Joined 5y
    824 points Ranked 5577th
    14 medals 1 legendary 1 rare
    • Returned 5000 times Medal icon
    • Returned 1000 times Medal icon
    • Reached 1,000 Points Medal icon
    • One month a member Medal icon
    • 6 months a member Medal icon
    • 1 year a member Medal icon
    In the "advanced" options of Team Fortress 2, you can set which hitsound/killsound to use. Some of the hitsound options have multiple different sounds associated, but all of the killsounds only have one. However, you should be able to do something like Alias CycleKillsounds "IncrementVar TF_Dingaling_Last_Effect 0 4 1; Wait 1; CycleKillsounds" in the console, and then CycleKillsounds. You can put those two commands in an "AutoExec.cfg" file to execute them on start-up automatically.

    The alias up there makes a console command called "CycleKillsounds", which cycles through different killsounds, and then re-executes itself a 66th of a second later so it keeps cycling through them. Then to start the loop in the first place, "CycleKillsounds" has to be typed into the console.

    In the command, "IncrementVar" increments a variable, and "TF_Dingaling_Last_Effect" refers to which effect to use for the last hit (the one that kills).
    The "0" is the minimum value, so just leave it at 0. The "4" is the maximum value, so set it to the amount of killsounds you have, minus one. The "1" is how much to increase the value by, so just leave it at "1".
    And then it waits a 66th of a second before re-executing itself, meaning it cycles to the next killsound every 66th of a second.

    Now, it's going to be up to you to find out which value of TF_Dingaling_Last_Effect refers to which killsound. All I can help you with is that you can check the file-names in alphabetical order if you open up tf_sound_misc_dir.vpk with GCFScape and look in "ui" for any files that start with "killsound", and you can try setting TF_Dingaling_Last_Effect to a value and then see what option is selected in the "advanced" options for the killsound.
    • Helpful x 1
    • Thanks x 1
    • Cheers x 1
    *Insert User Title here*
  • 3mo
    DrCheech avatar
    DrCheech Offline
    Member Joined 8mo
    276 points Ranked 13885th
    So it does work after some messing around, but there are a few things I need to add:

    The command line should look like this:
    alias CycleKillsounds "IncrementVar tf_dingalingaling_last_effect 0 4 1; Wait 24; CycleKillsounds"        (empasis on the dingaling actually being labeled as dingalingaling for god knows what reason).
    Made the wait 24 simply because it was having issues at lower and was consistent at 24.

    The only current remaining struggle I'm having is actually replacing the alternate killsounds. I place the sound files into my folder(ie, as killsound_beepo), but the sound just goes silent in game.

    Update: Got the sounds working. One of the sound files was partially corrupeted and therefor gave weird results.
    Meme Extraordinaire


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

More embeddable images

Bookmark and Share


DrCheech avatar
DrCheech Offline
Member Joined 8mo
276 points Ranked 13885th

Send a Private Message to the submitter



Date Added
3mo tracking pixel