Hi, you could follow this here How do I use the AI Perception Teams?
Generally speaking, the system uses the IGenericTeamAgentInterface
to extract the team information from the actors you want to perceive and the AI controller that the AI perception component belongs to. It then uses a function that takes two FGenericTeamId
(which it extracts via the interface) as input and outputs the affiliation between the two.
That means what you would need to do, is implement the IGenericTeamAgentInterface
in any actor you want to perceive, optionally overwrite it also in the AI controller and then you need to create your own attitude solver function and tell the system to use that via the FGenericTeamId::SetAttitudeSolver
function.
AFAIK the default attitude solver function will return friendly if both have the same team, and hostile otherwise. But if the actor does not implement the IGenericTeamAgentInterface
, then it will return neutral.