Download

How to delete the children, if I delete their parent Actor in the editor

For the sake of context, I plan to use this for a blobber (First Person, dungeon crawler, grid-based movement, Turn-Based).

My question is simple, the answer looks daunting. I’m not sure if my goal is even possible.

I want to make a [Grid] actor, which is a 2D array of tile meshes. It keeps information on array coordinates, location in the world, and if it can be walked on top of (e.g. I’m tile at point (0,0), my landscape location is (250,300), and I can be walked on).

So my plan is to have a [Grid] actor, that will have [Tile] Actors nested inside. (These [Tile] actors will have a visible mesh that can be seen in the world). A grid can have up to a couple of thousand tiles (which I plan to divide into multiple tiled levels in a [World Composition] for performance).

The question, when the [Grid] parent actor is destroyed, can I automatically destroy all of its children [Tile] actors? Or is that not supported?

I’ve looked at tutorials or methodologies for implementing navigable grids, but I couldn’t find anything relevant to my needs. I plan to use a large 2D array with tile mesh world representation so that I can design large dungeon levels manually in the viewport (and handle the grid-based movement logic for the player).

I believe you can get all children of a class by using the “Get all Child Actors” node. Then you could just destroy/remove each instance in the array. Check this post on adding it to an array. https://forums.unrealengine.com/deve…ldren-in-array