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 can I call functions of a Child Actor Component?

I have tow actor blueprint classes Cube and Shape with some functions.When i added Cube into Shape,Cube changed to a child actor component of Shape.Now,how can I call functions of Cube in Shape's blueprint?

Product Version: UE 4.14
more ▼

asked Mar 20 '17 at 12:21 PM in Blueprint Scripting

avatar image

6 1 2 2

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

2 answers: sort voted first

You have to get the child actor, and cast to it to its class, like this:

alt text

You could also cast it on begin play or somewhere, and promote it to a variable, then you won't have to cast it every time you want to access it.

alt text

get.png (46.7 kB)
cast.png (68.5 kB)
more ▼

answered Mar 20 '17 at 12:52 PM

avatar image

1.8k 49 20 67

avatar image 咬大人 Mar 20 '17 at 01:00 PM

Why i cannot do this casting?alt text

111.png (62.2 kB)
avatar image Mosel3y Mar 20 '17 at 01:13 PM

You are casting the child actor component, but you have to use Get Child Actor first, like in my screenshot above. Since it's the actor you want to cast, not the component itself.

avatar image StudioK Apr 17 '18 at 04:09 AM

How to you "get child actor" in the blue print above? I have a TextRender component and I have no way of casting that component to something. All I want to do is to call a function in that component.

alt text

casting.png (37.3 kB)
avatar image Leo Zhekov Apr 18 '18 at 12:47 PM

I was struggling on this as well. Found out that if you drag your child component and from the pin search for Child Actor, this exact node will appear.

avatar image StudioK Apr 18 '18 at 02:23 PM

Thanks for a reply. In this case however, "Child Actor" is a component type or component name in this blueprint? In my case, I added a component which is my own blueprint. Thanks.

avatar image cmwheeler Apr 08 '18 at 10:54 PM

jesus, what is a "Do Something" node or an "Operate" node?!!?

avatar image ThompsonN13 Apr 08 '18 at 11:35 PM

those are just functions/events the people created in their actors

avatar image cmwheeler Apr 09 '18 at 03:12 PM

For anyone else who lands here, and faces the same frustration I did, pay a lot of attention to the chain that is "Component Name" -> "Target Child Actor" -> "Cast To BlueprintType" Once you have that in your blueprint, functions on the Blueprint Type become available as nodes on the blueprint

avatar image Darth Biomech Mar 23 '19 at 05:19 AM

How did you get that "cast to" node instead of flow-based one?

avatar image Lolxh4 Mar 23 '19 at 02:52 PM

Right click on the node and at the bottom of the menu click "Convert to pure cast".

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

Here is the answer: alt text

answer.png (293.0 kB)
more ▼

answered Feb 26 '19 at 02:20 AM

avatar image

38 3 3 5

(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