Delete the actors in the array


How can I delete the actors in the array. As soon as the actors in the array are deleted, the actors in the map must also be automatically deleted.

This doesn’t work

Just add a CLEAR command on the array here

Still does not work. actor is still present in the map.

Are we talking about components or actors? You’re saying actor but are destroying a component. There’s a major difference.

If CubeX populated the array with components belonging to another actor, the above will not work. We cannot destroy components belonging to another actor - have a look at the tooltip of the Destroy Component node.

Instead, create a Custom Event in the actor owning the pertinent component and call that. if you do not have access to the actor that owns the component, call Get Owner on the component first.

1 Like

Thank you very much, it works! I still have a lot to learn.

1 Like

And do clear the array afterwards as suggested above to avoid null references.