Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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

Product Version: UE 4.16
more ▼

asked Dec 06 '18 at 07:01 PM in C++ Programming

avatar image

90 15 17 23

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first


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

more ▼

answered Dec 07 '18 at 11:06 PM

avatar image

266 4 5 6

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question