# Respawning a Child Actor from a Child Actor Component?

**URL:** <https://forums.unrealengine.com/t/respawning-a-child-actor-from-a-child-actor-component/439004>\
**Category:** AI\
**Tags:** spawn, actor, child, unreal-engine, CPP, question\
**Created:** [December 6, 2018, 7:01pm UTC](https://forums.unrealengine.com/t/respawning-a-child-actor-from-a-child-actor-component/439004 "2018-12-06T19:01:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![alvarofer0020](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@alvarofer0020](https://forums.unrealengine.com/u/alvarofer0020)\
**Post date:** [December 6, 2018, 7:01pm UTC](https://forums.unrealengine.com/t/respawning-a-child-actor-from-a-child-actor-component/439004/1 "2018-12-06T19:01:02Z")

</div>

Hello

Currently i have started to use child actor components on my AI Spawning System, so while on the editor users can customize the actor being previewed on the child actor ( mostly changing the parameters of AI Characters ) and then at runtime fight against said customized instance of the actor without having to make a new blueprint with the modified parameters

Child actor components work great in the sense that i can modify my actor straight in the viewport, However im having various issues trying to respawn the actor once its destroyed

If i call CreateChildActor(); directly on my child actor component then it does respawn the actor but then its missing its skeletal mesh component ( or other components )

I also tried using the FActorSpawnParameters ( Template ) field, so i spawn a new actor, assign the previous actor thats currently still alive as its template ( so it can spawn with the customized parameters ) It works for a few seconds before eventually crashing the editor ( Assertion Failed regarding the animation blueprint )

So yeah it seems the template parameter is pretty buggy when used with Characters or pawns?

Tldr:Im trying to create a new instance of a child actor component while keeping its modified parameters on the new instance

Any help is certainly appreciated

---

<div class="post-metadata">

**Author:** ![MazyModz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MazyModz](https://forums.unrealengine.com/u/MazyModz)\
**Post date:** [December 7, 2018, 11:06pm UTC](https://forums.unrealengine.com/t/respawning-a-child-actor-from-a-child-actor-component/439004/2 "2018-12-07T23:06:12Z")

</div>

Hello,

I think the best way to do this by using ChildActorComponents is to cache the parameters with a struct or class.  
So when you respawn the actor you apply the cached params.

~ Dennis “MazyModz” Andersson
