How can I destroy individual Actors in procedural level

Hi there, I’m attempting to make a procedural world using a blueprint actor, at the moment it’s just a soil piece with a collision volume around it. I’m spawning the blueprint procedurally in order to make a field from within another blueprint.

Here’s how my blueprint that spawns the soil looks like:

3d230ded63e67cda4ef59b137d441e8d2bc7dc67.jpeg

Now I need a way to interact with each of those actors individually so I can make changes like removing it, moving it around, changing the mesh… and so on. First I wanted to find out how I can delete all actors, however getting the return value and pass it to the Destroy Actor node only makes the very last actor disappear, all others remain.

How can I get access to every spawned actor individually?

Thanks for any help!

Make an array of all spawned actors. Just add them after spawn to the array. Then make a “for each loop” to destroy them. If you want to interact with a specific one make “get” and take use the index of wished bp. Is this what you meant ?

Yes this would be exactly what I mean…
In fact I thought of it as well however this here doesn’t seem to work, it still only deletes the last actor not all of them!

I’m probably doing something backwards, would be grateful for some more help.

Thanks a lot!

That’s because your array has only 1 element. Get Soil Array and drag a pin, type Add, and hook up you *SpawnActor Soil Script *there.

Alright it works now, thanks a lot!