Download

How to make an AI differentiate between enemies and allies and perform actions accordingly?

I’ve spent a bit trying to find tutorials or information about making enemy AI’s see various actors differently. Right now when another actor goes into my enemy’s perception radius it always triggers the code for sensing my player character and runs that code. I want the enemy to do different things depending on what pawn is in the perception radius. All I can find about this is C++ code tutorials and information about what would seem like such a basic task is surprisingly sparse. So far in my research I’ve found nodes called “Get attitude Towards” and “Detection by affiliation” but I’m not sure how to label different assets as different classes to identify.

Any idea what kind of stuff I need to look into for this or any tutorials you guys could recommend?

Assign the pawn a team number. If team number == the one of the owning Pawn/Character then it;s friendly.