# 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.

![](/files/-MjtwKbhanO_86HlGcyE)

## 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") ](/files/-Mju3Bi_0yPcoT_EQg_p)

This is received by the component:

![](/files/-Mju3jY1fDE5XU89v0v-)

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.

![](/files/-MjtwVtNrLC8fZXY95CL)

## 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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://malbersanimations.gitbook.io/animal-controller/utilities/animator-event-sounds.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
