# In-game Behaviour

### Observer

The enemy stands still and observes the scene (turning periodically). If he noticed a player, he will inform other AIs in the current area and they will start looking for the player. If a firefight begins, the observer will attack from his original position.

![](/files/PbWYSdGYmqBdsw7ff6Rw)

### Warning State

If you mark the **'Use** **States'** checkbox, the enemy will use **Warning** and **Find** states during the game.

![](/files/lxLDEaBGvML4TjvpzIDf)

#### How it works:

<mark style="color:green;">**Warning State Enabled**</mark>

* If an enemy sees a character with the <mark style="color:green;">**central vision**</mark>, he will immediately attack him.
* If the enemy sees (with the <mark style="color:orange;">**peripheral vision**</mark>), hears, is close to the player or the player has shot him a few times, the warning state is activated and the enemy will look for him.&#x20;
* If while searching the enemy has found the character, he'll attack him again.
* If the enemy doesn't see or hear the character, he looks for him for а while again. And after that returns to waypoints.

<mark style="color:red;">**Warning State Disabled**</mark>

* If the enemy sees\* or hears a character, he immediately attacks him.
* If not, he immediately returns to waypoints.

{% hint style="info" %}
\*in this case, the enemy has only one (central) vision area.&#x20;
{% endhint %}

Also, you can unit enemies in your scene so that act together.

{% content-ref url="/pages/-LzqmNXQZBNmxB5RRHgA" %}
[Adding to the Game](/enemies/adding-to-the-game.md)
{% endcontent-ref %}


---

# 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://docs.gercstudio.com/enemies/ai-controller/behavior.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.
