Finding Instantiated Actor Location

So utilizing Peter L. Newton’s [AI tutorial][1] I successfully incorporated AI into our game.

However, I wanted to make a modification that allows the player to throw bottles that will distract the AI. To do this I’ve added a branch to my AITree Behavior Tree,

made modifications to our AIDetectEnemy Blueprint (such that it will raytrace to both the player and the locations where the bottles hit,

and made a seperate AICheckBottle function such that the AI should move to the location to “attack” the bottle.

I found actors to be the simplest way to do so (both the player and the bottle that is), but I’m having issues getting the AITree to actually define the Bottle in my Blackboard.

I’ve included pictures of my progress so far and any tips are certainly welcome. I could be on the completely wrong path but based on my understanding of his code this is what I have so far.

Is there an easier way to pass this location to the AI? It seems as if GetAllActorsOfClass doesn’t work with objects that are being Instantiated and Deleted as time goes on…

Scratch that, I’ve decided to use the same AIChaseEnemy and AIAttack Blueprints but decided to replace the player target in those with the bottle. Again, the question remains as to how I can track the location of this bottle. (Even if there’s only one alive at a time)

Got it!!!