> For the complete documentation index, see [llms.txt](https://black-horizon-studios.gitbook.io/emerald-ai-wiki/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://black-horizon-studios.gitbook.io/emerald-ai-wiki/api/available-api/animation-api.md).

# Animation API

## Play Emote Animation

Plays an emote animation according to the EmoteAnimationID parameter (from the AI's Emote Animation List).

```csharp
EmeraldAPI.Animation.PlayEmoteAnimation(EmeraldSystem EmeraldComponent, int EmoteAnimationID)
```

## Loop Emote Animation

Loops an emote animation according to the EmoteAnimationID parameter (from the AI's Emote Animation List). StopLoopEmoteAnimation must be called for the animation to stop playing.

```csharp
EmeraldAPI.Animation.LoopEmoteAnimation(EmeraldSystem EmeraldComponent, int EmoteAnimationID)
```

## Stop Loop Emote Animation

Stops an emote animation from looping using the EmoteAnimationID parameter (from the AI's Emote Animation List).

```csharp
EmeraldAPI.Animation.StopLoopEmoteAnimation(EmeraldSystem EmeraldComponent, int EmoteAnimationID)
```

## Override Idle Animation

Manually sets the AI's next Idle animation instead of being generated randomly. This is useful for functionality such as playing a particular idle animation at a certain location such as for an AI's schedule. Note: The animation numbers are from 1 to 6 and must exist in your AI's Idle Animation list. You must call DisableOverrideIdleAnimation() to have idle animations randomly generate again and to disable this feature.

```csharp
EmeraldAPI.Animation.OverrideIdleAnimation(EmeraldSystem EmeraldComponent, int IdleIndex)
```

## Disable Override Idle Animation

Disables the OverrideIdleAnimation feature.

```csharp
EmeraldAPI.Animation.DisableOverrideIdleAnimation(EmeraldSystem EmeraldComponent)
```
