Setting up the Cover Component

Note: Emerald AI 2024 version 1.3.0 or higher is required to use this component.

Setting up the Cover Component

The Cover Component gives AI the ability to search for Cover Nodes and use their positions for cover and attacking. Upon detecting a Cover Node, an AI will travel to it and rotate towards their current target. Depending on the setting for the Cover Node, the AI will either stand, crouch then attack for the set Attack Seconds, or crouch and repeatedly peak based on its Peak Times. This can help AI feel more intelligent and challenging for players and other AI to fight. There are various settings to control how your AI react when they are active on a Cover Node.

Assigning Cover Animations

You should first assign an AI's Cover Animations. This can be done through an AI's Animation Profile and opening the Combat Cover Animations foldout. Here, you will be able to assign a Cover Idle and a Cover Hit animation.

Assigning a Cover Node LayerMask

The first thing you will need to do is assign a LayerMask for your Cover Nodes. This allows the Cover Component to efficiently search for objects only using the specified layers. These layers should be exclusively used for your Cover Nodes. It it recommended to only use 1 to keep the setup and management as easy as possible. For this tutorial, the Cover layer is being used.

Adjusting the Cover Settings

The rest of the settings can be customized as needed. Each setting has a description of its functionality. It's worth noting that only one AI can use a Cover Node at a time. Emerald AI and its Cover Component manages this automatically.

Note: It is recommended that you have a relatively high Attack Distance for your ranged attacks. If your Attack Distance is too low, the AI may attempt to get closer due to them being out of range. These are adjustable through the Combat Component.

Last updated

Was this helpful?