Hi, can someone please explain how to create a global (not any class’ member function) function in C++ and make it available in blueprint graphs? I checked the documentation about blueprint functions, but it’s only dealing with implementations inside an actor-class.
What I need is my own version of “ApplyDamage”, because I’m beginning to think that the UE4 implementation is rather bad, especially when it comes to using UDamageType.
I only use blueprints at the end of my class-hierarchies, because I find them useful for setting up references and other defaults as well. I still want to at least be able to trigger damage events via blueprint.
This function will now be globally visible for all blueprints. Note that for some functions you may need a UWorld object e.g. for spawning or game state information. While you could pass in a valid UObject all the time it can be more comfortable to just use the calling object as a world context object. This way you can drop the Context Object pin.