x

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"

How to get child actors?

Hi,

what I am trying to do:

Get all the child actors from an actor.

Example:

->Parent Actor

  • Child Actor 1

  • Child Actor 2

  • Child Actor 3

After I got the child actors from the Parent Actor I want to attach them to different Actor. The only thing I found was "Get Children Components" but this only shows me the components not the Actors they are in.

Any ideas?

Product Version: Not Selected
Tags:
more ▼

asked Nov 23 '14 at 07:34 PM in Blueprint Scripting

avatar image

Viewtron
110 9 12 12

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

1 answer: sort voted first

Child actors are components that attach actors to actors as components, so you need to read from child actor component what actor they have and that component got variable exposed to blueprint for that

https://docs.unrealengine.com/latest/INT/API/Runtime/Engine/Components/UChildActorComponent/ChildActor/index.html

So drug return value of "Get Children Components" (ofcorse it needs to be single item of array) and drop it, in context menu you should see variables or just search "get child actor"

more ▼

answered Nov 23 '14 at 08:16 PM

avatar image

Shadowriver
35.9k 928 169 1105

avatar image Viewtron Nov 23 '14 at 09:19 PM

And If I'm parenting spawned actors with each other do each actor need this child actor component? Does this mean I have to attach the other actors as a component of the other actor? There is no way of getting the childs directly?

Could you show a picture of this in a blueprint (or is there any tutorial of how to use child actor components)? I'm kinda new to blueprints and can't seem to understand how this works.

avatar image Shadowriver Nov 23 '14 at 09:32 PM

Child Actor Component makes actor physically attached to parent actor... like any other component, if you want to do other kind of relation, simple variable (or array) will do the thing

avatar image Viewtron Nov 23 '14 at 10:09 PM

Ok, I'm going to use an actor array. Thanks for the help.

(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