# Events Component

<figure><img src="https://content.gitbook.com/content/v03IiZPaMe8fX49a9MnO/blobs/yDso0EgG1g6QwB9dH39S/EventsComponent.png" alt=""><figcaption><p>The Emerald Events Component. Pressing the foldout areas will expand its options.</p></figcaption></figure>

## Using the Events Component

The Events Component allows users to create Unity Events for various functionality that happens both in and out of combat. These events can be used to call custom functions or code. There's also an option to call these through the Emerald Events editor through the inspector. There are 13 built-in Unity Events that are called during various Emerald AI actions. You can use these events to trigger custom function calls and other mechanics to expand functionality with AI.

{% hint style="success" %}
Here are the available tutorials and guides for the Events Component.
{% endhint %}

<table data-view="cards"><thead><tr><th></th><th></th><th></th><th data-hidden data-card-cover data-type="files"></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td></td><td><p>            Applying the </p><p>      Events Component</p></td><td></td><td><a href="https://content.gitbook.com/content/v03IiZPaMe8fX49a9MnO/blobs/OcXbvAj4sbRUoJW0IPGY/AddingTheEventsComponent.gif">AddingTheEventsComponent.gif</a></td><td><a href="events-component/applying-the-events-component">applying-the-events-component</a></td></tr><tr><td><p></p><p>Events Through the Editor</p></td><td></td><td></td><td><a href="https://content.gitbook.com/content/v03IiZPaMe8fX49a9MnO/blobs/s9qQAjtfpzhoKPeQYqsO/ExampleUnityEvent.png">ExampleUnityEvent.png</a></td><td><a href="events-component/creating-an-event-through-the-editor">creating-an-event-through-the-editor</a></td></tr><tr><td></td><td>    Events Through Code</td><td></td><td><a href="https://content.gitbook.com/content/v03IiZPaMe8fX49a9MnO/blobs/9slKyhBOypNjtVru9CVc/CACoverImage.png">CACoverImage.png</a></td><td><a href="events-component/creating-an-event-through-code">creating-an-event-through-code</a></td></tr></tbody></table>


---

# 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-components-optional/events-component.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.
