How to destroy specific Actor from array
Hello everyone. I have a little blueprint here. As far as i understand, it spawns a pawn at one location, adds newly spawned object into array of those pawns and orders it to move to another location. And it is looped for 10 times with 0.5 delay. So i want every actor to selfdestroy after reaching destination point, but i'm stuck with "how to GET this exact pawn that succeeded this 'AI MoveTo'.
I mean i even prepared index aray (for some reason), but i dont understand how to use it now. Can someone help me, pls?
The problem with your current code looks to be that you're not removing the actor you're destroying from the list.
A lot of a problems could happen with this way of coding, instead I would suggest you add an event to your AI controlled actor. This event should handle the
Then you just Create the Actor, then fire that even on it. This way you don't need to manage a list.
answered Jul 15 '17 at 11:56 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here