Whats the deal with Event Dispatches not executing for children if they are called in the parent class?

I have a event dispatch assigned to a function that just prints hello on a parent class. I then have the same dispatch called in the same parent blueprint if an int value is 0 .

I have made 5 child blueprints out of this parent blueprint.

According to my understanding if int variable is 0 for any child blueprint then all 5 children should fire the Hello print statement. But i only observe one child blueprint firing the Hello statement.

What am i missing?
EDIT:
Just quickly whipped up the below image. It is implemented in Parent BP and i expect it to fire 5 times for every child i have but it only fires once.

1 Like

Event dispatchers are bound to object instances, not to classes.

You will need to bind the event handler to the event dispatcher in each of the objects that the function is called on, and you need to invoke the event dispatcher for each object that it should be invoked on.

2 Likes

You learn something new everyday…

Wish i asked this question 2 days ago…

On that note is there any efficient way to just implement the logic on parent BP and have the children follow? Each child will be looping through a different integer value and executing logic accordingly.

Will interfaces help in this case?

  • top is parent:

  • bottom is the child mimicking what the parent is doing

Now every instance of the child who calls its own custom event, will spit out an int via a dispatcher even though the child does not implement the logic for it (we’re using parent’s logic instead):

Thank you.