Comment on page
Emerald AI 3.0
Create high quality AI quickly with easy to use editors and tons of built-in features.
The integration of UHFPS into Emerald AI is quite straightforward. All you have to do is replace the Emerald AI Player Damage script with a modified script and add the Emerald AI UHFPS Component to the Emerald AI character.
- 1.Navigate to the Integrations folder in the UHFPS folder and import the content from the Emerald AI - Integration package into the project. This should replace the player damage script and import the Emerald AI Integration folder into your project.
If the EmeraldAIPlayerDamage script is not modified, just put this damage function in it. The script can be found here: Emerald AI\Scripts\Components\EmeraldAIPlayerDamage.cs
public void SendPlayerDamage(int DamageAmount, Transform Target, EmeraldAISystem EmeraldComponent, bool CriticalHit = false)
// The rest of the Emerald AI code here...
//Sends damage to another function that will then send the damage to the UHFPS player.
void DamageUHFPSPlayer(int DamageAmount, Transform Target)
if(TryGetComponent(out PlayerHealth playerHealth) && !playerHealth.IsDead)
IsDead = playerHealth.IsDead;
- 2.Place EmeraldAI_UHFPSComponent to the Emerald AI character object. This will ensure that the player will be able to damage the Emerald AI character.
- 3.It will be necessary to modify the Emerald AI tags and layers to use those from the UHFPS. First, change the Tag to Flesh and the Layer to BodyPart.
- 4.Go to Detection & Tags -> Tag & Faction Options -> Tag Options and change Emerald Unity Tag to Flesh and Detection Layers to Player.
- 5.Finally, add the Target Position Modifier component to the HEROPLAYER object and set the Height Modifier to 1.7. This will ensure that the Emerald AI raycast detection will be directed at the player's head instead of the player's pivot position.
Unity Asset Store link to the Emerald AI 3.0 asset page: