# Sound API

{% hint style="info" %}
**Note:** Most of these are used through Animation Events or internally (which are called through the Emerald Components directly and not through the static EmeraldAPI script). All sounds are based off of an AI's assigned [Sound Profile](https://black-horizon-studios.gitbook.io/emerald-ai-wiki/emerald-profiles-and-objects/sound-profile).&#x20;
{% endhint %}

## Play Sound Clip

Plays a sound clip according to the Clip parameter.

```csharp
EmeraldAPI.Sound.PlaySoundClip(EmeraldSystem EmeraldComponent, AudioClip Clip)
```

## Play Idle Sound

Plays a random idle sound based on your AI's Idle Sounds list. Can also be called through Animation Events.

```csharp
EmeraldAPI.Sound.PlayIdleSound(EmeraldSystem EmeraldComponent);
```

## Play Attack Sound

Plays a random attack sound based on your AI's Attack Sounds list. Can also be called through Animation Events.

```csharp
EmeraldAPI.Sound.PlayAttackSound(EmeraldSystem EmeraldComponent);
```

## Play Warning Sound

Plays a random warning sound based on your AI's Warning Sounds list. Can also be called through Animation Events.

```csharp
EmeraldAPI.Sound.PlayWarningSound(EmeraldSystem EmeraldComponent);
```

Plays a random block sound based on your AI's Block Sounds list.

```csharp
EmeraldAPI.Sound.PlayBlockSound(EmeraldSystem EmeraldComponent);
```

## Play Death Sound

Plays a random death sound based on your AI's Death Sounds list. Can also be called through Animation Events.

```csharp
EmeraldAPI.Sound.PlayDeathSound(EmeraldSystem EmeraldComponent);
```

## Play Walk Sound

Plays a footstep sound from the AI's Footstep Sounds list to use when the AI is walking. This should be setup through an Animation Event.

```csharp
EmeraldAPI.Sound.WalkFootstepSound(EmeraldSystem EmeraldComponent);
```

## Play Run Sound

Plays a footstep sound from the AI's Footstep Sounds list to use when the AI is running. This should be setup through an Animation Event.

```csharp
EmeraldAPI.Sound.RunFootstepSound(EmeraldSystem EmeraldComponent);
```

## Play Random Sound Effect

Plays a random sound effect from the AI's General Sounds list.

```csharp
EmeraldAPI.Sound.PlayRandomSoundEffect(EmeraldSystem EmeraldComponent);
```

## Play Sound Effect Sound

Plays a sound effect from the AI's General Sounds list using the Sound Effect ID as the parameter. This is useful for creating sounds with Animation Events such an interaction sound.

```csharp
EmeraldAPI.Sound.PlaySoundEffect(EmeraldSystem EmeraldComponent, int SoundEffectID)
```
