How to setup AI Perception with Neutrals/Friends/Enemies?

How can i set those up in blueprint?

You can’t set it in blueprints, or at least I haven’t found a way to do it blueprints. I’ve created a tutorial on how to setup AI Perception. Here is a link: [AI Perception Tutorial][1]

Basically your character needs to implement the IGenericTeamAgentInterface. With that you can set a TeamID to your character. By default all actors are in a team NoTeam which has a value of 255. If the actors are in no team, they are neutral to others. If they don’t implement that interface, again they are neutral to others. If they are in the same team (TeamID = 1 for example) they are friendly to each other. If they are in different teams different from 255, then they are enemies.

[1]:

2 Likes

Thank you dbrizov

Glad I could help :slight_smile:

Is this still not implemented outside of C++? Would it be possible for it to just be a component rather than an interface? Seems like a more flexible solution long-term.

4 Likes