# Creating Attack Animation Events

In order for [Ability Objects](/emerald-ai-wiki/emerald-profiles-and-objects/ability-object.md) to be triggered, an AI needs to have a certain Animation Event on each AI's attack animation. This allows the ability to trigger right at the desired frame. You can do this through the Emerald AI Animation View. If you are not familiar with opening this manager, please see the [Opening the Animation Viewer](/emerald-ai-wiki/emerald-components-required/animation-component/opening-the-animation-viewer.md) section.

Once you have the Animation Viewer open, set the desired attack animation via the Current Animation pulldown.

<figure><img src="/files/1lkucCkkgBP0cKqjCgm7" alt=""><figcaption></figcaption></figure>

Next, drag the timeline slider to the desired frame that you would like the attack event to happen. Next, use the Event Types pulldown to select the Create Ability. Pressing the Event button will automatically create the Create Ability event. You can apply your [Attack Transform](/emerald-ai-wiki/emerald-components-required/combat-component/assigning-attack-transforms.md) to the String parameter, if desired. When you are done, press the Apply Changes button. This will save the newly created Animation Events.

{% hint style="warning" %}
**Important:** You will need to do this for all the attack animations an AI uses.
{% endhint %}

<figure><img src="/files/C61tlwYx1lEQInR2ZtK8" alt=""><figcaption></figcaption></figure>


---

# 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://black-horizon-studios.gitbook.io/emerald-ai-wiki/emerald-managers/animation-viewer-manager/creating-attack-animation-events.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.
