> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kinemation.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# 🔈Sounds

> In this section you will learn how sound effects are used in the pack.

## Player and Weapon Sounds

All sound effects in the **Tactical Shooter Pack** are played via the **AudioSource** component, specifically the `PlayOneShot` method.

The weapon has a separate method that allows to play a sound with a given pitch and volume:

TacticalShooterWeapon.cs

```text theme={null}
protected void PlaySound(AudioClip clip, float pitch = 1f, float volume = 1f)
{
    if (_audioSource == null)
    {
        Debug.LogWarning($"Failed to play weapon sound: invalid Audio Source!");
        return;
    }

    _audioSource.pitch = pitch;
    _audioSource.volume = volume;
    _audioSource.PlayOneShot(clip);
}
```

This function is used to randomize firing sounds by tweaking their pitch and volume for more variety. For most of other actions, pitch and volume remain unchanged.

## Actions

The **Tactical Shooter Pack** does not rely on animation events to play sounds. Instead, whenever an action is executed, a respective sound effect will be played:

## Movement

Walk and sprint sounds are played at runtime with some delay depending on the current `gait` value:

**Gait** is the animation value in range \[0;2], where 0 stands for idle, 1 for walk and 2 for sprint states.

**Error** allows to control more precisely when to trigger a sound.

<Tip>
  **Tip**: For example, if you set it to zero, the sprinting sounds will be played immediately when gait > 1. Instead, we give animation some more time to blend it and only then we start playing movement sounds.
</Tip>
