AI how to predict multiple enemies periodically?
Edit: 4.13 fixed this problem, use 4.13 instead
So I use the "Request Controller Prediction Event" and then check the stimulus class to see if it's equal to AISense_Prediction. So far so good. They do seem to get proper location calculated when the even OnTragetPerceptionUpdated fired. Now my question would be what's the proper way to keep track of multiple enemies properly??
As of now, I fire projectile every time OnTargetPerceptionUpdated fired and all the condition fits(are from enemy, not dying/ragdoll, valid pawn with successful sense), there are no cool down. But somehow the event seems to only fire when you enter/leave the sight range. And then randomly either doing nothing/spam every frame while AI controller is running behavior tree.(doing nothing while BT is doing the wait task, spam every frame happens when AI is on moving to task).
So, essentially, the question becomes, how to I make sure OnTargetPerceptionUpdated fires periodically when an actor in range? How do I do this on multiple enemies? Cause I do see when there are a lot enemies AI come into range, only a few prediction request is fired. Which means even though sight is registered when see in visual debug mode, this event is not fired for every enemy, thus no Request Controller Prediction Event is issued.
here is my simplified version of how I wire up prediction now.
Follow this question
Once you sign in you will be able to subscribe for any updates here