Emerald AI Wiki
  • Home
  • Getting Started
    • Included Demo Scenes
      • Shooter AI Demo
      • Melee Combat Demo
      • Ranged Combat Demo
      • Summoning AI Demo
      • Healing Demo
      • Patrolling Demo
      • Inverse Kinematics Demo
      • Ragdoll Demo
      • Grenade Demo
      • Footsteps Demo
      • Random Waypoints Demo
      • Dynamic Wandering Demo
      • Health Bar Demo
      • Alignment Demo
      • Explosion Damage Demo
      • Sound Detection Demo
      • Fleeing Demo
      • Mouse Movement Demo
      • Companion Demo
      • Equippable Weapon Demo
      • Optimization Demo
      • Working Villager Demo
      • Debugging Demo Scene
    • Getting Started
    • Baking NavMesh
    • Setting up a Player with Emerald AI
    • Upgrading to URP and HDRP
    • Difference Between Emerald AI 3.0 and Emerald AI 2025
  • Help
    • Solutions to Possible Issues
    • Using the Wiki Search Tool
    • Release Notes
    • Support
  • Emerald Components (Required)
    • Animation Component
      • Creating an Animation Profile
      • Opening the Animation Viewer
    • Behaviors Component
      • Creating an Aggressive AI
      • Creating a Companion AI
      • Creating a Cautious AI
      • Creating a Coward AI
      • Creating a Passive AI
      • Creating a Pet AI
      • Creating Custom AI Behaviors
    • Combat Component
      • Assigning Combat Actions
      • Assigning Attack Transforms
      • Assigning Ability Objects
      • Weapon Type Amounts
    • Detection Component
      • Applying a Head Transform
      • Setting up the Detection Layers and Player Tag
      • Faction Relations
    • Movement Component
      • Using the Align AI Settings
      • Using the Dynamic Wander Type
      • Using the Waypoints Wander Type
      • Using the Stationary Wander Type
      • Using the Destination Wander Type
    • Health Component
      • Setting up an AI's Health
      • Setting up an AI's Hit Effects
    • Sounds Component
      • Creating an AI's Sound Profile
  • Emerald Components (Optional)
    • Adding and Removing Optional Components
    • Cover Component
      • Applying the Cover Component
      • Setting up the Cover Component
      • Setting up Cover Nodes
    • Debugger Component
      • Applying the Debugger Component
      • Drawing an AI's Path
      • Drawing an AI's Destination
      • Drawing an AI's Line of Sight
      • Drawing an AI's Undetected Targets Line
      • Debug Log Targets
      • Debug Log Current Obstruction
    • Decal Component
      • Applying the Decals Component
      • Setting up the Decals Component
    • Events Component
      • Applying the Events Component
      • Creating an Event Through the Editor
      • Creating an Event Through Code
    • Footsteps Component
      • Applying the Footsteps Component
      • Setting up the Footsteps Component
    • Inverse Kinematics Component
      • Applying the IK Component
      • Creating an Animation Rig and Multi-Aim Constraint
      • More Info on the Animation Rigging Package
    • Items Component
      • Applying the Items Component
      • Creating Equippable Weapons
    • Location Based Damage Component
      • Applying the LBD Component
      • Assigning Colliders to the LBD Component
      • Damaging the LBD Component
    • Optimization Component
      • Applying the Optimization Component
      • Setting up the Optimization Component
    • Sound Detector Component
      • Applying the Sound Detector Component
      • Understanding the Sound Detector Settings
      • Using an Attract Modifier
    • Target Position Modifier Component
      • Setting up the TPM Component on an AI
      • Setting up the TPM Component on a Player
    • UI Component
      • Applying the UI Component
      • Setting up the UI Component
    • Weapon Collision Component
      • Applying the Weapon Collision Component
      • Setting up the Weapon Collision Component
  • API
    • Accessing the EmeraldAPI Script
    • Available API
      • Movement API
      • Combat API
      • Faction API
      • Sound API
      • Animation API
      • UI API
      • Detection API
      • Behaviors API
      • Health API
      • Items API
    • Damaging an AI
    • Damaging a Custom Character Controller
    • Using the Built-in Object Pooling
  • Emerald Profiles & Objects
    • Ability Object
      • Bullet Projectile Ability
      • Grenade Ability
      • General Projectile Ability
      • Ground Projectile Ability
      • Aerial Projectile Ability
      • Arrow Projectile Ability
      • Melee Ability
      • Teleport Ability
      • Summon Ability
      • Healing Ability
      • Area of Effect Ability
      • The Collider Module
      • The Damage Module
    • Combat Action Object
      • Blocking Combat Action
      • Dodge Combat Action
      • Strafe Combat Action
      • Random Movement Combat Action
      • Switch Target Combat Action
      • Creating Custom Combat Actions Through Code
    • Reaction Object
      • Creating a Reaction Object
      • Included Reaction Objects
    • Animation Profile
      • Creating an Animator Controller
      • Applying Animations
      • Regenerate Animator Controllers
      • Copying Animation Profiles
    • Sound Profile
      • Creating an AI's Sound Profile
      • Setting up Footstep Sounds
      • Setting up Attack Sounds
      • Setting up Warning Sounds
      • Setting up Death Sounds
    • Waypoint Profile
    • Footstep Surface Object
      • Creating a new Footstep Surface Object
      • Setting up a Footstep Surface Object
  • Emerald Managers
    • Setup Manager
      • Setting up an AI with the Setup Manager
    • AI Duplicator Manager
      • Duplicating an AI
    • Animation Viewer Manager
      • Opening the Animation Viewer
      • Previewing Animations
      • Creating and Applying Animation Events
      • Creating Attack Animation Events
    • Faction Manager
      • Modifying Factions Through the Faction Manager
    • Combat Text Manager
      • Adjusting the Combat Text Settings
      • Accessing the Combat Text System Through Code
  • Integrations
    • Integrations
      • Final IK
      • Invector
      • FPS Engine
      • Dialogue System
      • Quest Machine
      • Love/Hate
Powered by GitBook
On this page
  • Setting up the Cover Component
  • Assigning Cover Animations
  • Assigning a Cover Node LayerMask
  • Adjusting the Cover Settings

Was this helpful?

  1. Emerald Components (Optional)
  2. Cover Component

Setting up the Cover Component

Last updated 4 months ago

Was this helpful?

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

Important: The Cover Component will only work for ranged abilities. If your AI has melee abilities, you will need to ensure your melee abilities have the Condition Module enabled with the Condition Type set to Distance From Target and Value Comparison Type set to Less Than. High priority should also be disabled. This will allow the AI to only use its melee abilities if their current target is within your set range. If this is not done for your melee abilities, your AI may attempt to run to its current target's position.

Important: The Cover Component is currently only compatible with Weapon Type 1. It is not recommended it is used with AI that have multiple weapon types. Support for this will be added with a future update.

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.

Important: It is highly recommended that some type of crouch idle and crouch hit animation are used. This is to allow the most flexible cover system with not requiring specific animations. This is demonstrated in the above gif.

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.

Required: If you are using an AI created from an update prior to version 1.3.0, will need to regenerate your Animation Profile in order to have the new Cover States added. Not doing so will not allow the cover animations to play or be assigned to the Animator Controller. This can be done by . This will update your Animator Controller to the newest version and apply the missing Cover States.

Important: If you do not have a crouch animation, you can leave these blank, but you will need to ensure all your use the , which bypasses the need for a crouch animation. If you do not do this, your AI will glitch do to the lack of cover animations. This is only necessary if you do not have crouch animations.

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 .

Regenerating your Animator Controller
Cover Nodes
Stand Cover Type
Combat Component