Download

Why won't disconnecting the three gray event with their parent function override them?

Hi everyone :slight_smile:

As we all know there three grayed out event by default when you create a blueprint class. If you implement one of them , the derived classes of that class will automaticly has a parent call connected to that event.But if you disconnect the connection in the derived classes won't automaticly override the event.So you will see a event(still grayed out through) doesn't connect to any thing but still can do things.


I found this recently when I wanted to prevent a derived class to perform doing it's parent's "Event Tick". I was confused because the class still do its parent "Tick" until my colleague told me "Tick" was not overrided.

It would be more userfriendly if these event can be automaticly overrided or at least give a warning.

I don’t understand your problem.
This is basic coding with OOP.

If your Parent provides a function “Tick”, this “Tick” will executed in children, as long as you don’t override it.
If you place a node “Tick” you are automatically overriding this function.
If you don’t place this, you don’t override it.

When creating a new Child, your graph looks like this:

bcc52faec6f723f4b6ae4517feaa42ab60d680c0.jpeg

Thus, it is automatically overridden, it just has a call to the parent’s Function.

If you just disconnect the event with its parent call (don’t do anyting else) , you will get an event doesn’t connect to anything but still run its parent call.

Just like this one , the parent call will be called even though it has been disconnected from the event.

4fd6edc6ba9a59de5585fc22cff41fa609108947.png