---
description: Rack up the kills and be satisfied doin' it!
---

# Killstreak Sounds

I wrote killstreaks mainly with [announcers](announcer) in mind. That being said, they're fairly easy to set up.

**NOTE: These killstreaks will only reset upon death, they have no time limit.**

## File Location

Killstreaks use the file located in:\
&#xNAN;**`englishclient_mp_common.bsp.pak000_dir/scripts/vscripts/client/cl_obituary.gnut`**

[Follow this guide if you don't know how to unpack the vpk.](../how-to-guides/unpack-repack-.vpk-files)

## What To Do

Establish an integer variable at the beginning of the gnut named killstreak:

<figure><img src="https://3229178430-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyzWpbBNlNErdKoq8n9DL%2Fuploads%2FhBTiOSXY4iRrZmH69FLz%2Fbandicam%202021-09-30%2013-03-21-094.png?alt=media&#x26;token=3ad0d1ce-2632-40d1-98e6-eb913d129053" alt=""><figcaption></figcaption></figure>

Just like with [Killsounds and Deathsounds](killsounds-and-deathsounds)...\
Scroll through **cl\_obituary.gnut** until you find the first appearance of:\
`string attackerString`\
`string weaponString`\
`string victimString`

This should be around line 253.

<figure><img src="https://3229178430-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyzWpbBNlNErdKoq8n9DL%2Fuploads%2FxL3PHcexvH4SBEXA8BIA%2Fbandicam%202021-09-18%2013-20-54-13r4.png?alt=media&#x26;token=a8b3688a-caea-4dd9-98be-d6f593c3b0a6" alt=""><figcaption></figcaption></figure>

Right under these strings, add the following code for **killstreaks:**

```
    if(attacker == GetLocalClientPlayer() && victim != GetLocalClientPlayer() && victimInfo.petDisplayName == "" )
    {
        int totalnumber=RandomInt([number])
        killstreak+=1
        GetLocalClientPlayer().ClientCommand("killstreak"+killstreak+"_"+totalnumber)
    }
```

Replace **\[number]** with however many variations of **killstreaks** you plan on using. Note that this randomizes every time it runs through. If you want the random pick to be more consistent, check [Announcer](announcer). Otherwise, just make this **1**.

If you already have custom killsounds, you can simply put them in the same if-statement.

<figure><img src="https://3229178430-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyzWpbBNlNErdKoq8n9DL%2Fuploads%2Fbpu0Vv1r4qRFerbyha7Y%2Fassets_-MbT6A_iN6z35klmSlMZ_-MkrzqInYPwg1Xytjc0u_-Mks1UFpo2i6E3Vahri4_bandicam%202021-09-30%2013-48-52-177.webp?alt=media&#x26;token=565a4b61-8caa-4648-ab43-8efe76ac11a4" alt=""><figcaption></figcaption></figure>

If you also want to keep a killstreak for how many player titans you've killed (either auto-titan or titan with a player using it) you can write this **(you need to establish titanstreak at the beginning of the gnut too)**:

```
    if(attacker == GetLocalClientPlayer() && victim != GetLocalClientPlayer() && victimInfo.petDisplayName != "" )
    {
        int totalnumber=RandomInt([number])
        titanstreak+=1
        GetLocalClientPlayer().ClientCommand("titanstreak"+titanstreak+"_"+totalnumber)
    }
```

To get your killstreaks to reset when you die, write this:

```
    if(victim == GetLocalClientPlayer())
    {
        killstreak=0
        titanstreak=0
    }
```

Again, if you have custom deathsounds, you can just put them in the same if-statement.

<figure><img src="https://3229178430-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyzWpbBNlNErdKoq8n9DL%2Fuploads%2FUjAiyoeRjm1Stqw4C7wm%2Fbandicam%202021-09-30%2014-22-39-131.png?alt=media&#x26;token=ea837fcb-5a18-4aa8-9b06-b452af3bda92" alt=""><figcaption></figcaption></figure>

The neat thing with this code is that, once added, you don't even have to go back and change something if you want to add more killstreak sounds or move them around. You simply need to name your custom sounds properly and edit the autoexec.

If you want your killstreaks to loop back around after a certain point, you can write this inside of your killsound/killstreak if-statement:

```
        if(killstreak==[number])
        {
            killstreak=0
        }
```

Where **\[number]** is the amount of kills you wish for your killstreak to be reset.\
(usually the same as your highest killstreak number)\
Of course, you can do the same for titanstreak inside of your titanstreak if-statement.

## media and autoexec.cfg

{% hint style="info" %}
When making the audio for your killstreaks/titanstreaks, I recommend spacing them out a bit so that they don't overlap each other, at least not as much. For example, if you have a custom killsound, killstreak, and titanstreak, and you kill a player who's in a titan, you're gonna hear all 3 sounds at once unless you space them properly. Just something to think about.
{% endhint %}

Place the killstreaks/titanstreaks you'll be using in the Titanfall2>r2>media folder.\
For naming, you would put `killstreak`**`[amount of kills]`**`_`**`[RandomInt number]`**

Remember that the lowest **RandomInt** roll is 0, not 1.

<figure><img src="https://3229178430-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyzWpbBNlNErdKoq8n9DL%2Fuploads%2FbSrJxtcFNOFcP2Yz5i6a%2Fassets_-MbT6A_iN6z35klmSlMZ_-Mks9uxzl_z_ObEXeI2T_-MksEbucJr3s9M6mal-H_bandicam%202021-09-30%2014-45-38-817.webp?alt=media&#x26;token=13a3eff7-8b55-44e0-b6ed-7ee82cfdb3d7" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3229178430-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyzWpbBNlNErdKoq8n9DL%2Fuploads%2FCiPvTcnI6kluDJ3l1NDy%2Fbandicam%202021-09-30%2014-45-53-968.png?alt=media&#x26;token=a8051dad-2911-4ae3-9e49-c0cf04a50070" alt=""><figcaption><p>Ignore that these all end in 1, it should be 0 if you're just doing this tutorial and aren't randomizing them.</p></figcaption></figure>

To call the killstreaks in the autoexec, write them out like so:

```
alias killstreak[kills]_[number] "playvideo killstreak[kills]_[number] 1 1"
```

Where **\[kills]** is the amount of kills you need in one life for that sound to play, and **\[number]** is the chosen integer from RandomInt (starting from 0)

If you're doing killstreaks and titanstreaks, your autoexec should look something like this:

<figure><img src="https://3229178430-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyzWpbBNlNErdKoq8n9DL%2Fuploads%2FBdB5k8tuR1MqVjnzB2iA%2Fassets_-MbT6A_iN6z35klmSlMZ_-MksSUel55E7xj58IKqf_-MksTK4buxi-OtqjdZLK_bandicam%202021-09-30%2015-45-48-351.webp?alt=media&#x26;token=04cfc6ae-311e-475d-9669-6255484dcf90" alt=""><figcaption><p>Again, ignore that the names all end in 1, put 0 instead if you're just doing this tutorial and aren't randomizing them. </p></figcaption></figure>

[Follow this guide for more info about the autoexec and how to properly set it up.](../how-to-guides/autoexec.cfg)
