Download

Blueprint K2 fucntion with argument

Hey guys,

I’ve recently started playing around with blueprints and I have a question. In the event graph of a blueprint you can add a function, this shows a new window similar to the event graph with just one node. If you hover the mouse over this node it says:“K2 node function Entry”

I would like to make a function like this which requires you to pass one or several arguments. I’m working on a menu system and I want to create a function which tweens all buttons on the current screen away (an array of UButtons would be the argument in this case).

Next i want to want to make a class derived of this blueprint. So I can just call AnimateButtonsOffscreen(UbuttonArray argument) in all of my userwidget blueprints.

Is this possible? And also are there any good places to learn about K2 functions, because I’ve been googling for hours, but haven’t found a single usefull piece of help.

got it. just open a K2 fucnction in the blueprint editor. Select either the start or the end Node (so that theres a yellow line around it). and than in the bottom of the details panel there an inputs and outputs tap. Add in input for an argument, an output for well, an output of the function.