# Assigning Combat Actions

## Assigning Combat Actions

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.

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

{% hint style="info" %}
**Note:** Combat Actions are created through the EmeraldAction class and allows users to create their own custom Combat Actions, if desired. &#x20;
{% endhint %}

{% hint style="info" %}
**Note:** Combat Actions are covered further on the [Combat Actions](/emerald-ai-wiki/emerald-profiles-and-objects/combat-action-object.md) section of the Emerald AI Wiki. This section briefly covers Combat Actions, but is more about applying them to an AI.
{% endhint %}

By default, there are no Combat Actions assigned to an AI. Users can add them by opening the Combat Actions foldout, pressing the + button, enabling the Combat Action element, and assigning a Combat Action from one of the ones included.&#x20;

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

You can open up the Combat Action to further custom the settings. This includes lengths, conditions, and more, depending on the Combat Action.

<figure><img src="/files/invQJCutEDpQevkEDta0" 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-components-required/combat-component/assigning-combat-actions.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.
