# Destroy a parent actor and it's children

**URL:** <https://forums.unrealengine.com/t/destroy-a-parent-actor-and-its-children/280758>\
**Category:** World Creation\
**Tags:** parent, Destroy, unreal-engine, Physics, question\
**Created:** [April 16, 2014, 11:59am UTC](https://forums.unrealengine.com/t/destroy-a-parent-actor-and-its-children/280758 "2014-04-16T11:59:34Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![HoOz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HoOz](https://forums.unrealengine.com/u/HoOz)\
**Post date:** [April 16, 2014, 11:59am UTC](https://forums.unrealengine.com/t/destroy-a-parent-actor-and-its-children/280758/1 "2014-04-16T11:59:34Z")

</div>

I have a parent actor with two childs, when I destroy the parent using Destroy Actor function it only deletes the parent and it’s childs won’t be destroyed !

Is there a function to destroy them ?

---

<div class="post-metadata">

**Author:** ![Shadowriver](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Shadowriver](https://forums.unrealengine.com/u/Shadowriver)\
**Post date:** [April 16, 2014, 12:32pm UTC](https://forums.unrealengine.com/t/destroy-a-parent-actor-and-its-children/280758/2 "2014-04-16T12:32:00Z")

</div>

I dont know how you do that in blueprint, but your childs need to bind this event in there owner

> **[OnDestroyed](https://docs.unrealengine.com/5.1/en-US/API/Runtime/Engine/GameFramework/AActor/OnDestroyed/)**
>
> Event triggered when the actor has been explicitly destroyed.

Theres also childrens array, but its not accessable thru blueprint

---

<div class="post-metadata">

**Author:** ![HoOz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HoOz](https://forums.unrealengine.com/u/HoOz)\
**Post date:** [April 16, 2014, 12:34pm UTC](https://forums.unrealengine.com/t/destroy-a-parent-actor-and-its-children/280758/3 "2014-04-16T12:34:30Z")

</div>

I am able to access that array , but components are returned as sceneComponent and since it’s it’s a component there’s a function for it called DestroyComponent but it’s only mark it !

---

<div class="post-metadata">

**Author:** ![DizzyWes](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DizzyWes](https://forums.unrealengine.com/u/DizzyWes)\
**Post date:** [April 16, 2014, 12:47pm UTC](https://forums.unrealengine.com/t/destroy-a-parent-actor-and-its-children/280758/4 "2014-04-16T12:47:23Z")

</div>

Howdy!

is right, you’ll need to call an event from the parent and bind that event in the child. Take a look at the Content Examples and the **Blueprint\_HUD** map.

There’s an example of this for the _BP\_Pickup\_Child\_Health_ and _BP\_Pickup\_Parent_ Blueprints. Granted the implementation might be a little different than what you are doing, but should give you an idea where to start.

-W

---

<div class="post-metadata">

**Author:** ![Shadowriver](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Shadowriver](https://forums.unrealengine.com/u/Shadowriver)\
**Post date:** [April 16, 2014, 12:55pm UTC](https://forums.unrealengine.com/t/destroy-a-parent-actor-and-its-children/280758/5 "2014-04-16T12:55:13Z")

</div>

What i understood you got 3 actors, 2 of them are owned by one actor (SetOwner). And you what to destroy owner actor the 2 owned actors should be destroyed two. So you bind those 2 owned actors to that event (in owner) i gave you.

Children array i meant this variable which is part of actor class:

> **[Children](https://docs.unrealengine.com/5.1/en-US/API/Runtime/Engine/GameFramework/AActor/Children/)**
>
> Array of all Actors whose Owner is this actor, these are not necessarily spawned by \[UChildActorComponent\](API\\Runtime\\Engine\\Components\\UChildActorComponent)

And it not marked to be accessable thru blueprint

---

<div class="post-metadata">

**Author:** ![HoOz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HoOz](https://forums.unrealengine.com/u/HoOz)\
**Post date:** [April 17, 2014, 10:42am UTC](https://forums.unrealengine.com/t/destroy-a-parent-actor-and-its-children/280758/6 "2014-04-17T10:42:30Z")

</div>

So what you basically mean is:

-At the moment I want to destroy the owner, I bind him to OnDestroyed dispatcher and inside it’s event I destroy those two owned actors ?

-so when the owner is destroyed the event inside the dispatcher fires-up and destroy those owned actors

please correct me if I’m wrong

---

<div class="post-metadata">

**Author:** ![FatalBreak](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FatalBreak](https://forums.unrealengine.com/u/FatalBreak)\
**Post date:** [February 26, 2021, 9:12pm UTC](https://forums.unrealengine.com/t/destroy-a-parent-actor-and-its-children/280758/7 "2021-02-26T21:12:48Z")

</div>

As soon as you create a child widget from a parent widget, you should have a reference made so that you can directly call them from the parent widget. You can them add them to an array of widgets so that if you go to remove from parent on the main widget, you can instead call a function that has a for each loop to call that on all of the children blueprints and then on completed, you can remove from parent to self.

---

<div class="post-metadata">

**Author:** ![TomaszKirsz](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tomaszkirsz/32/580112_2.png) [@TomaszKirsz](https://forums.unrealengine.com/u/TomaszKirsz)\
**Post date:** [November 9, 2022, 8:10am UTC](https://forums.unrealengine.com/t/destroy-a-parent-actor-and-its-children/280758/8 "2022-11-09T08:10:01Z")

</div>

Create BP Actor Component (so can be added to any Actor) with that BP code

 ![2022-11-09 090938](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/7/d/17d648c0ed1baba7d17fd0115a39c16d8a39fd50.png)
