> For the complete documentation index, see [llms.txt](https://docs.gercstudio.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.gercstudio.com/integrations-manager/emerald-ai.md).

# Emerald AI

A demo scene named <mark style="color:green;">**"USK & Emerald AI"**</mark> is located in the <mark style="color:green;">**(Demo Files/Scenes/Integrations/Emerald AI)**</mark> folder.

**How to activate:**

1. Download the asset and then enable an integration with it in the <mark style="color:orange;">**(Window -> USK -> Integrations Manager -> AI)**</mark>.
2. Add the following code to the <mark style="color:green;">**EmeraldAIPlayerDamage**</mark> script.

```
#if USK_EMERALDAI_INTEGRATION
    DamageUSKCharacter(DamageAmount);
#endif

#if USK_EMERALDAI_INTEGRATION
    void DamageUSKCharacter(int value)
    {
        if (GetComponent<GercStudio.USK.Scripts.Controller>() != null)
            {
                var controller = GetComponent<GercStudio.USK.Scripts.Controller>();
                controller.Damage(value);
            }   
    }
#endif
```

![](/files/ENohZNPXZXT7UZ0H4EdC)

**How to use:**

1. Follow the Emerald manual to add enemies to the scene, then add a USK character there.&#x20;
2. Make sure your enemies have the correct **Detection Layers.**

![](/files/iHRVfnGHlfxf7Fb16VUa)
