Download

how to override a function?

Hi, i’m trying to override a function that i made on my base weapon blueprint.

i will explain what i want to make a little bit, i have made some basic function on my base weapon blueprint and now i want to override the “fire weapon” function, but if a click to override the function as this answer said https://answers.unrealengine.com/questions/28488/overriding-a-function-in-blueprints.html i’m just getting to the original function on my base weapon blueprint.

is there a way to override a blueprint function retrieving the entire function in the new blueprint and make some changes in the new blueprint leaving the original function without any change?

i’m asking this beacause in the original function i used a play anim node without any animation on it, to let me change the animation that i want to play on each one of the game weapons.

thanks in advance for all the help.

Are you asking on how to call the original function (Super) when overriding the function? If so, right click on the Input node if it is a function, or event node if it is an event, and ‘Add call to parent’.

i just want to get the complete nodes from the original function into the extended blueprint to choose the animation to must be played.

can this be done?

No you cannot access the internal nodes of the parent function. You can only access its input/output via “call to parent function”.

If I’m understanding your requirement properly - you need to add an input to the original function, something that tells it which animation to use.
That way, when you override it you can call the parent and pass it which animation to use.

thank your for the information, i will do that.