Getting Weird AI Agent errors

evade123

Member
Hello,

Installed deathmatch and Behavior Designer (with the right integration and addons etc.) Ai works, but getting some errors when certain things happen. First when my player gets killed I get this error

error player killed by ai.PNG


Second.. when my player respawns and tries to damage the AI Agent.. I get this error

error when trying to shoot ai after respawn.PNG


Here is what my behavior manager in the scene looks like.

manager.PNG
 
Last edited:
Line 86 of AttackMovement looks like:

Code:
            m_TargetParent = m_PrevTarget.GetCachedParentComponent<UltimateCharacterLocomotion>().gameObject;

Based on that it doesn't look like the target object that it is trying to attack has the Ultimate Character Locomotion component. The agent can only attack other characters.
 
hm. Both my player and the AI Agent have the Ultimate Character locomotion component I believe

Edit: I see what you mean now. I had a cube that had the tag "Enemy" so I could test. Once I removed the "Enemy" tag from the AI Agents visibility, the error no longer occurred.

Do you have any recommendations on where to begin tweaking the enemy difficulty? Currently the agent is an aimbot lol. Also how to make the AI only shoot my player and not other agents?
 
Last edited:
Do you have any recommendations on where to begin tweaking the enemy difficulty? Currently the agent is an aimbot lol. Also how to make the AI only shoot my player and not other agents?
Take a look at the deathmatch manager - in it it has three different difficulty levels that adjust the accuracy/health based on the difficulty.
 
You can use the same concepts as the DeathmatchManager for your own scene. You'll need to create a new class to do this though.
 
You can edit the initial spread and starting health/damage without having to code, but when you introduce multiple difficulty levels you'll need scripting experience.
 
Gotcha. Yeah I just need to know how to tweak the individual agents settings. I dont need a diffuculty system etc. Where can I tweak the spread etc.? Thanks
 
Top