I have a Blueprint called “BP_Projectile”, and it contains a function called “HitTarget”. I made a new blueprint called “BP_Projectile_Pistol” that inherits from “BP_Projectile”, and I would like to override the “HitTarget” function, but I’m not sure how.
What I’ve so far is simply create a new function in “BP_Projectile_Pistol” and try to rename it “HitTarget”, but I then get an error that reads, “HitTarget is already in use by another variable or function!” Is overriding even possible, and if so how can I do it?
The issue here is that functions which
have no outputs are actually
considered events! You can find their
overrides in the normal event graph
“Add Event” menu, and add a call to
their parent function by right
clicking on that added event. We’re
working on making it so that functions
will always appear as functions,
regardless of whether or not they have
outputs, but in the meantime, that’s
the distinguishing factor. Sorry for
the confusion!
As for UE4.7 now the functions are listed correctly even if they haven’t any output, but we can’t still able to override them.
Is there a good reason for this strange behaviour? One would expect to be able to override any function despite of their returns, just like in code.
Thanks for this thread! I ran into this issue today.
Thanks to this thread, I made my function return a throwaway junk bool just so that I could override the function in derived BP classes, where I wanted to call the parent function and add additional functionality. (Without it having to live as an event in the main EventGraph.)
Perfectly functional workaround now in 4.10, but it would still be nice if you got around to differentiating between events and functions with no return, considering it’s now 2016.
4.18 and this is still an issue! Treating it as an event is not sufficient, as I have behaviour I need to happen after the parent function has completed execution.
_< Just had t o look this up for an inventory system I was building, pulled my hair out for 3 hours trying to figure out why it wasnt working only to find this