> 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/emerald-profiles-and-objects/combat-action-object.md).

# Combat Action Object

<figure><img src="https://content.gitbook.com/content/v03IiZPaMe8fX49a9MnO/blobs/ns3rNHQ9YedQJrsPlIA1/CombatActionComponent.png" alt=""><figcaption></figcaption></figure>

## Combat Action Object

Combat Actions are actions that an AI can make while in combat, given the conditions for the actions are met. There are 5 included Combat Actions, these include; Blocking, Dodging, Strafing, Switching Targets, and Random Combat Movement. Combat Actions are created through the EmeraldAction class and allows users to create their own custom Combat Actions, if desired.

{% hint style="warning" %}
**Important:** [Root Motion Animations](https://docs.unity3d.com/Manual/RootMotion.html) are required for the Strafe and Dodge Combat Actions.
{% endhint %}

{% hint style="info" %}
**Note:** Models, animations, and particle effects are not included.
{% endhint %}

{% hint style="success" %}
Here are the available tutorials and guides for the Combat Action object.
{% 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>  Blocking Combat Action</td><td></td><td><a href="https://content.gitbook.com/content/v03IiZPaMe8fX49a9MnO/blobs/8kaWSmciJPZlxZtMHdfx/BlockExample.gif">BlockExample.gif</a></td><td><a href="/emerald-ai-wiki/emerald-profiles-and-objects/combat-action-object/blocking-combat-action.md">Blocking Combat Action</a></td></tr><tr><td></td><td>   Dodge Combat Action</td><td></td><td><a href="https://content.gitbook.com/content/v03IiZPaMe8fX49a9MnO/blobs/OnMomeUktcdtr0WXhNp8/DodgeExampleGif.gif">DodgeExampleGif.gif</a></td><td><a href="/emerald-ai-wiki/emerald-profiles-and-objects/combat-action-object/dodge-combat-action.md">Dodge Combat Action</a></td></tr><tr><td></td><td>    Strafe Combat Action</td><td></td><td><a href="https://content.gitbook.com/content/v03IiZPaMe8fX49a9MnO/blobs/Af8uhV7E72ZRSktS3P7m/StrafingExample.gif">StrafingExample.gif</a></td><td><a href="/emerald-ai-wiki/emerald-profiles-and-objects/combat-action-object/strafe-combat-action.md">Strafe Combat Action</a></td></tr><tr><td></td><td><p>     Random Movement   </p><p>        Combat Action</p></td><td></td><td><a href="https://content.gitbook.com/content/v03IiZPaMe8fX49a9MnO/blobs/0kSFsityLdollRJw2d0F/Random%20Movement%20Example.gif">Random Movement Example.gif</a></td><td><a href="/emerald-ai-wiki/emerald-profiles-and-objects/combat-action-object/random-movement-combat-action.md">Random Movement Combat Action</a></td></tr><tr><td></td><td><p>          Switch Target </p><p>         Combat Action</p></td><td></td><td><a href="https://content.gitbook.com/content/v03IiZPaMe8fX49a9MnO/blobs/341yvJkQNm8t1UBq6J7O/SwitchTargetExample.gif">SwitchTargetExample.gif</a></td><td><a href="/emerald-ai-wiki/emerald-profiles-and-objects/combat-action-object/switch-target-combat-action.md">Switch Target Combat Action</a></td></tr><tr><td></td><td><p>       Creating Custom </p><p>        Combat Actions</p></td><td></td><td><a href="https://content.gitbook.com/content/v03IiZPaMe8fX49a9MnO/blobs/BLSE3FaoiJCg7OOENcn7/CoverDamagingLDBComponent.png">CoverDamagingLDBComponent.png</a></td><td><a href="/emerald-ai-wiki/emerald-profiles-and-objects/combat-action-object/creating-custom-combat-actions-through-code.md">Creating Custom Combat Actions Through Code</a></td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://black-horizon-studios.gitbook.io/emerald-ai-wiki/emerald-profiles-and-objects/combat-action-object.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
