how to send event to child?

Hello,

In my design, BP_Player_Base is a character blueprint which is used as a base class for all children(BP_Player_Child_1 and BP_Player_Child_2).

BeginOverlap event is captured inside BP_Player_Base. Then, function “CommonForAllChildren” will be called. The process inside function “CommonForAllChildren” is common for all children. After that, I want to send events to each child to trigger their own process inside BP of each child. How do I send event to each child?

Each child must have their own functionality inherited from the parent. For example, you have a mammal blueprint as your parent class and you have a cat and an elephant blueprint class inherited from the mammal class.

You create an event called “make a sound”, inside the parent class. All the child classes will have this event as well, and you can call this event to do their own thing (For example the cat blueprint, you can print “meow” from the “make a sound” event). So, whenever you call this function from the parent class, the elephant and the cat will trigger their own function. The idea is called override from inheritance and polymorphism in C++ which applies the same in the blueprint.

3 Likes

@56legion . Thanks a lot!