[4.7.6] Can't override Blueprint function without return value

Hi there,

Short and painful :wink:
If a function in a parent blueprint hasn’t a return value, it’s not possible to override it in a derivated blueprint.
If you press the override button in the blueprint editor, it only lists functions of the super class that return something.

UE4 considers functions of super class as events (which they arent’t, because in this case we would be allowed to do asynchronous stuff there).

That’s very annoying to work around currently: Instead of just overriding them like expected you have to catch an event with the same name in the event graph and add a call to the parent event. That’s very confusing.


Hey spyro,

This was a known issue, but it’s been fixed in 4.8. If you see the same behavior in the 4.8 Preview, please let us know. Thanks!

That’s great to read, many thanks. :slight_smile:

I see the old behavior (overridden functions becoming events) in 4.8.3.

Hi JanSordid,

That’s not actually a bug, but intended. The bug Spyro was reporting was that a function in the Parent BP that didn’t have an output would not show up in the list for Overridable functions in the My Blueprint tab inside its Child BP. That has been fixed.

Hmm, but isn’t a event asynchrounly handled, unlike a function…?

Under the hood, events are implemented as functions. It dates way back, when the Blueprint system was still in its infancy. One of the only ways we have to discern between the two is the presence of a return value.

This was for native C++ functions that were exposed to Blueprints. The unfortunate side effect of this is that it also affected functions added through Blueprints, something that probably wasn’t originally thought of.

Events are triggered just as a function would be, the only repercussion is that the event is run in the Event Graph: it utilizes the graph’s persistent state, rather than one that is reset with each function call. This means you can’t use things like local variables, etc.

I talked with the devs about it, and they said this is something that’s plagued them for a while and they want to correct, as it’s super confusing. I’ll follow up to see if we have any specific plan for that. For now, though, it’s just the way it’s set up in this instance =/

Hi Ben,

many thanks for making this clear for me. If that will change some day in the future I can live with that.

Only one thing: Would it be possible to declare specific events as private like a function (it should not be possible to call them from outside this class)?

No problem!

Currently we can’t set a custom event to private like you can with the Access Specifier in functions. There’s an existing feature request for that entered recently (UE-19803), and I’ll keep an eye on it and post here if I see it get implemented.

Many thanks (see also Feature suggestion: Private event nodes - Programming & Scripting - Unreal Engine Forums)

Cool, thanks, I’ll get someone to put that in today.

I’ll follow up to see if we have any specific plan for that.

Did any specific plan come of this?