# Animator Event Sounds

## &#x20;Overview

This component is used to play sounds with the Animal Controller.

This will receive events From the Animator and the Animations clips to play sounds using the method: PlaySound(string Name).&#x20;

This its recommended to be used when they are BlendTrees  on the Animator Controller, in which 2 or more Animation clips are blend. This blending weight is used to set the volume on the played sounds.

![](https://963537199-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lzhr1XSMzMqNXjRnNlb%2F-Mjtt3ySAGP_q6lEIvAl%2F-MjtwKbhanO_86HlGcyE%2Fimage.png?alt=media\&token=1c88006e-0d63-4626-88dc-d28f48fb2ab7)

## How it works

The Animator Event Sounds need [**Animation Events**](https://docs.unity3d.com/Manual/script-AnimationWindowEvent.html) placed on the Animation Clips.

These require the PlaySound function, and a String Value. The string value correspond to the Component Sound Element.

![The Raven Fly Animation Clip has an Event with a function PlaySound("Wing Flap") ](https://963537199-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lzhr1XSMzMqNXjRnNlb%2F-Mjtx2UvuMZ7kGP0P0Jc%2F-Mju3Bi_0yPcoT_EQg_p%2Fimage.png?alt=media\&token=c89e71ff-31e8-4626-989b-068634dc2fab)

This is received by the component:

![](https://963537199-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lzhr1XSMzMqNXjRnNlb%2F-Mjtx2UvuMZ7kGP0P0Jc%2F-Mju3jY1fDE5XU89v0v-%2Fimage.png?alt=media\&token=82e7ea54-5edd-4fc1-ab6d-ccaeb1074ed5)

And it plays the a random sound from the clips list. using the Internal or Global Audio Source.

## Requirements

The component needs to be at the same hierarchy as the Animator Component.

![](https://963537199-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lzhr1XSMzMqNXjRnNlb%2F-Mjtt3ySAGP_q6lEIvAl%2F-MjtwVtNrLC8fZXY95CL%2Fimage.png?alt=media\&token=ed3b38a6-b703-47ef-852e-88fe502658dd)

## Parameters

The component is made of a List of Event sounds.

![](https://gblobscdn.gitbook.com/assets%2F-Lzhr1XSMzMqNXjRnNlb%2F-Mjtx2UvuMZ7kGP0P0Jc%2F-Mju3jY1fDE5XU89v0v-%2Fimage.png?alt=media\&token=82e7ea54-5edd-4fc1-ab6d-ccaeb1074ed5)

### Name

Name or value of the Event Sound. This is the value set on the Animation Event string value. Its case sensitive.

### Volume

Volume value to play the sound on the Audio Source

### Pitch

Pitch value of the Audio Source (Internal or Global)

### Interval

Interval Time to play a sound forever. This is used when the PlaySoundForever funtion is called

### Clips

List of Audio clips used on the Event Sound. When the Function PlaySound() is called. it will select a Random Clip from the list.

### Internal Source

Audio Source reference to use to play the Sound on the Event Sound. If this value is None, the Sound will be played on the global Audio Source.

### Global Source

Audio Source reference to use to play the Sound on all Event Sounds if the Internal Source is empty.
