I just recently started learning AIPerception and using it with Blackboard to make an AI capable of team vs team fighting -
I’m using On AI Perception Updated and Sight as the primary sense within the AI Controller. Upon an actor successfully sensed, that sensed Actor is set as a blackboard key called TargetActor and I made sure that the AI only sets a new target only if they don’t have a TargetActor set. Because my characters Simulate Physics when they “die” instead of using Destroy Actor, I set the dead Actors as “Downed” using Tags. Back inside the AI Controller where the AIPerception is, I then put a condition - if the sensed Actor has the “Downed” tag, they will set their TargetActor to None.
What I realized was wrong with that was that, instead of removing that specific “Downed” TargetActor, it caused my AI to wander around in Idle ignoring perceived enemy actors because they constantly sensed “Downed” enemies who were laying around. Thus, I don’t know how to remove the specific “Downed” enemy as TargetActor and get them to switch to a new TargetActor.
I am currently stuck on trying to make an Array that adds perceived enemy actors and removes “Downed” enemies of that each side uses to store TargetActors so they can switch targets to another perceived enemy once they kill their TargetActor. This is difficult for me because I don’t know how to integrate an Array into Blackboard and have that information communicated across all teammates.
I ask about arrays in blackboard here:
I want to ask - Are there any other methods I can use to clear the specific TargetActor with the actors using “Downed” tag? I’m not sure how to approach this at this moment so some tips would be greatly appreciated.
I based my scripts off of the Advanced AI Tutorial provided by Epic.
Thanks!!