How do I make a custom function available to other blueprints?

I created a custom function in my construction blueprint, but I can’t access it anywhere else. I have the box checked for it to be public but I can’t get it to show up anyplace.

I Thought maybe it was because I created it in a construction blueprint, but I tried it in a new blueprint in the actor class and it didn’t work there either. It shows up and works just fine in the blueprint I’ve created it in, but nowhere else.

I believe you can’t use functions like this, they are local to Blueprint.

If you want to make some sort of utility functions, which can be used by every BP — create Blueprint Macro Library and add new Macros. It has almost same functionality as a functions, can have local variables and can be used everywhere in your project. As an example - ForLoop and ForEachLoop are macros.

If you have a set of different blueprints, for example - Sword, Axe and Hammer, and want to have “Swing” function for them, I recommend you to create a Blueprint Interface “Weapon” and add functions like “Swing”, “Parry” and etc, which are common for weapon classes. Then implement this Interface in sword/axe/hammer blueprint options and you will see Interface functions inside your basic Blueprint. However, this functions will be empty by default and you can specify what exactly function doing in particular Blueprint.

I will direct you to another thread I answered a few days ago…

you’ll likely have to do the same thing…

(your function is part of THAT blueprint and you’ll need to call it from THAT blueprint…either casting it or calling it from a variable that is set to THAT blueprint)…take a look…let me know if this helps…I’ve not done it with Construction scripts yet but I’d imagine it to be the same)…