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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Check if a blueprint is a child actor of another

Hi all,

So I have a parent blueprint, which has a child actor.

From the construction script of the child actor, I would like to get a variable, referencing it's parent. (If it is a child actor).

How would I do this?

Product Version: Not Selected
Tags:
more ▼

asked Apr 03 '15 at 04:20 PM in Blueprint Scripting

avatar image

ShrewGlue
434 97 83 108

avatar image Ranz Apr 03 '15 at 04:26 PM

There's a function 'Class Is Child Of' if that's what your looking. but i think creating a variable casted to its parent class will enable you to access the variable of that class that you're looking for

avatar image ShrewGlue Apr 03 '15 at 04:30 PM

It's returning false.

I have a get class of self wired into test class and parent class as the class that has the child actor as a component.

alt text

alt text

capture.png (91.4 kB)
capture1.png (23.8 kB)
avatar image Ranz Apr 03 '15 at 04:38 PM

Are you sure that the 'Self' is inherited from 'Default Player Class'?

In any case you can create a new variable of that Parent class if you want to access a certain variable from that parent class

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

1 answer: sort voted first

'Class Is Child Of'' is what you're looking for.

more ▼

answered Apr 03 '15 at 07:42 PM

avatar image

ShrewGlue
434 97 83 108

(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