Affiliation system

Hello,

I was wondering if anyone had any information about the affiliation system that is on the AIPerception components through blueprint? I just need to be able to re-categorize either the player or AI so they don’t both register as neutral. I have been hunting the web for this and have found nothing. Any help would be appreciated.

Jib

2 Likes

Hello,

I realize this question was quite a while back but when searching for the same answer it pops up at the top of the search !
So Here is the answer for anyone else looking for it:

“This property can be used to set up Sight perception for teams. Currently, Affiliation can only be defined in C++. For Blueprints, you can use the Detect Neutrals option to detect all Actors, then use Tags to filter out Actor types.”

2 Likes

I am having a similar problem. I have an AI that chases and attacks the player on sight. The problem comes when I have more than one of that AI in a world. It sees the other AI and then calls the “GetPlayerLocation” behavior tree event that I set up. I can fix this by changing the AI’s “Detection by Affiliation.” to only enemies. Sadly, then it doesn’t detect the FirstPersonCharacter or the AI. So I fixed and caused a problem. Can anyone help?
Much appreciated

@Gitchimo already helped!

Please excuse my ignorance, but I have never used the tag system, as of yet. Could you give an example?
Thanks

Gitchimo linked to the page about AI perception. Ctrl-F “tag” on that page will show you that tags can come with AI Stimulus objects. Follow that reference backwards by googling for class names, or using documentation search.

Another option would be to implement a particular interface on objects you want to detect, and cast the actors you’re considering to that interface, and only consider them if the cast works.

1 Like