Hi,
I have a project that has hit a bit of a stumbling block and I maybe misunderstanding the logic behind it.
In my project I have AI NPCs that use the AI Perception sight sense to recognise the player or other NPCs. Once the NPC has seen the player or an NPC for the first time it adds them to a list of know characters and tracks there details (name, personality, opinion currently). At this stage an NPC can recognise the player and adds it to the list it also checks if the detected player is already on the list and doesn’t add it if it is already there. It doesn’t work that way with other NPCs, NPC1 will detect NPC2 and add it to the list (That’s what I want), NPC2 will then detect itself. I think I may be misunderstanding some of the logic so any help is appreciated.
This should check if the NPC detected is itself or not. Actor is result of the sight sense perception being updated.
This is the section where it checks if the NPC is already in the list of known characters.
(I think this is the section that is causing me issues but I’m not sure what to replace it with)
Finally, if it is known then don’t add it, if is not known then add it to the list.