How to destroy an actor in an array of actors with a tag"..."

Hi all!

I’m trying to create an event on clicked that will destroy an actor that is contained in an array with a tag “Gem”. I have created a variable to store all those actors, but having hard time finding the right connections to destroy said actors in array.

Any and all help appreciated! Thanks.

One easy way to handle delete from an array is to start from the end. That skips the problem when you delete an index in an array while moving forward it usally makes you skip the next item.

So you could do something like this :

Feel free to ask if this is not clear

Hope this helps

  • Marc

Hi Marc, thanks for your quick reply. Sorry I haven’t gotten back to you, haven’t been able to get on unreal the past few days. Unfortunately I tried your suggestion to no avail. I have an actor array with 5 elements in the level blue prints as you can see here.

Each one of those elements is an actor and they all have a tag “Gem”. I have 81 of them being displayed in the play window and want to be able to destroy the actor I click on. But nothing is really working…