# Creating an Aggressive AI

{% hint style="info" %}
**Note:** It is recommended that users have fully setup an AI's Factions, Animation Profile, and other basic steps before proceeding.
{% endhint %}

## Creating an Aggressive AI

Aggressive AI will attack detected targets they have an Enemy Relation Type with. If they are attacked by someone like a player who they have a Neutral Relation Type with, they will only attack said target if attacked first.&#x20;

To set an AI's behavior, go to the AI's Behavior Component and expand the Behavior Settings foldout. Set the Current Behavior Type to Aggressive. This will opening up additional settings specifically for the aggressive behavior type.

{% hint style="info" %}
**Note:** Adding a Target to Follow will turn the Aggressive AI into a [Companion AI](/emerald-ai-wiki/emerald-components-required/behaviors-component/creating-a-companion-ai.md).
{% endhint %}

{% hint style="warning" %}
**Important:** While not covered in this section, setting the AI's Cautious Seconds to anything other than 0 will delay an AI from engaging with its detect target until after the Cautious Seconds has lapsed. This can appear to be detection issues, but is in fact a part of the Cautious AI functionality.
{% endhint %}

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

Once you have set your desired behavior settings, your AI should be able to attack any detected target that has a Relation Type of Enemy. If your AI is not detecting targets, ensure that its Cautious Seconds is set to 0 and that you have completed all steps within the [Getting Started](/emerald-ai-wiki/getting-started/included-demo-scenes.md) section of the Emerald AI Wiki.


---

# 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/behaviors-component/creating-an-aggressive-ai.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.
