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 handle a new component in child class?

Hi, I would like to ask you how to handle a child class of parent class having two additional elements not implemented in the parent class. Because in the parent class there are elements that I turn on and off and their handling of these events is placed in Character's BP. I would like to know how to join or do in a child class event that will allow you to turn on and off the next elements that previously did not occur.

In the simplest terms, the parent class has one light source that is turned off and on. The child's class has two light sources. How to handle the second light source in the child's class when the event is handle in Character's BP.

Product Version: UE 4.21
more ▼

asked Feb 24 '19 at 09:22 PM in Using UE4

avatar image

11 3 1 2

avatar image RimmyD Feb 24 '19 at 11:08 PM

You want to know how the parent class could control objects that only exist in the child class?

avatar image cedom96 Feb 25 '19 at 10:00 PM

Exactly :D

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

1 answer: sort voted first

You can't directly access it but it's common to instead make a function in the parent that the child can override and add logic to.

So let's say you have a function in your Parent called TurnOffAllLights and in it you set the parent's light component off.

In the Child you would Override TurnOffAllLights, call the Parent's Version (Right click the function node and choose Add Call To PArent Function), then add your logic to the end.

more ▼

answered Feb 26 '19 at 04:43 AM

avatar image

2.6k 98 16 97

avatar image cedom96 Feb 26 '19 at 06:05 AM

I was thinking about it, i will make a try :D

(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