# Setting up an AI's Hit Effects

## Setting up an AI's Hit Effects

The Hit Effect Settings controls whether or not an AI will play a hit effect when it receives damage. This is based on a list of hit effects set by the user. These hit effects are picked randomly each time the AI receives damage. The position in which a hit effect is spawned is based on the AI's [Target Position Modifier](https://black-horizon-studios.gitbook.io/emerald-ai-wiki/emerald-components-optional/target-position-modifier-component) component. However, if an AI is using a [Location Based Damage](https://black-horizon-studios.gitbook.io/emerald-ai-wiki/emerald-components-optional/location-based-damage-component) component, the position of the hit effect will automatically be based on the bone/transform that was hit.

{% hint style="info" %}
**Note:** An AI can still play a hit effect even if it is marked as [Immortal](https://black-horizon-studios.gitbook.io/emerald-ai-wiki/emerald-components-required/health-component/setting-up-an-ais-health).
{% endhint %}

<figure><img src="https://content.gitbook.com/content/v03IiZPaMe8fX49a9MnO/blobs/J1pJSMeR0PjVtOpZuMfF/HitEffectSettings.png" 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/health-component/setting-up-an-ais-hit-effects.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.
