Respawning a Child Actor from a Child Actor Component?
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
asked Dec 06 '18 at 07:01 PM in C++ Programming
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
answered Dec 07 '18 at 11:06 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here