attached actor array not complete?

Good day,

i have a simple spawn mechanism that requires me to clear instances and attached actors. But for some weird reason, the array loop does not destroy all attached actors. It seems like the array does not fill properly.

Any advice would be greatly appreciated. (Yes, the actors are attached as they move with the ‘parent’ actor)

Cache the result of pure functions to a local variable, and connect that to loop macros
Pure functions will get executed in every iteration of the loop

In your case, get attached actors will get called once in every loop, so after destroying the first actor, the next time the array returned by the function will be different, causing your loop to potentially miss some actors since every evaluation might return them in different order

1 Like

Also, I activate the event more than once and it will slowly remove more actors, but still not 100%

Cheers mate, Still learning. Experience is a treasure