Creating a Function that you can use from anywhere within Blueprint

Hey guys, I created a function that outputs a new location based on an origin point, degrees of rotation, and distance (basically polar coordinates). I created the function in the player controller class but I want to be able to use it like how every other blueprint command can be used, that is, without having to reference the controller class and what not. Can this be done without using C++? If so, any pointers on where I can find that information?

You can do that with Blueprint library. But I’ve had issues with those in the past regarding compiling/saving files but I don’t know if they’ve addressed those issues or not. Otherwise look into using an interface or a cast.

For the blueprint library thing, is it possible to implement it into the blueprint library straight through blueprint or do I have to implement it using C++? And yeah, I know about interface and casting just looking for a different way besides those two.

Hello,
Have you try macro libraries : Blueprint Macro Library | Unreal Engine Documentation

Thanks Fen, thats exactly what I needed!

For the record, you can make a blueprint function library without C++ (it’s just like the macro library like Fen suggested, only you create a function library instead of macro :p)

Ah okay, thanks TK-Master. I noticed that the macro library inherits from another class while the function library doesn’t. Thanks a lot guys!