Setting Enemy Target for AI with Multiple Targets

Hello All!

I have setup an AI pawn which gets it’s “enemy target” based on AI perception (sight). I use the “On AI Perception Updated” node to set my enemies by looping through the perceived actors and setting an enemy target if the cast to enemy base is true…

The issue I run into is that the ai pawn does not have any indication of more than one enemy. If there are a couple enemies within a close distance that enter the AI’s vision, the pawn may destroy the first enemy but won’t pursue the second. Any help to get perceived actors and “remember” all of them and focus on any, when one is removed, would be great!

Did u solve problem?

I did in a hackish way… I will need to come back and post an answer soon. That is unless someone with more experience can craft a better blueprint.