So I’m fairly new to UE4 and Blueprints but I’ve got a fair few years of games development experience.
I was wondering if making blueprint functions that act as getters and setters for things such as health is common practice with blueprints? I just want setting variables to fire events for things like updating HUD elements, etc and having overridden setters is normally the way I would go about doing so.
Basically, if I was to implement getter/setter functions for variables will I encounter problems later on with the way blueprints work?
i havnt done that in bp. But i assume you first need to set the function in your Parent Blueprint to Public/Protected.
Maybe you can even set up “Is overridable” or something like that.
The result would be that inside your child bp you should see that function under the category you set in parent. And then right-click it -> implement function.
but like i said i only did this with OnKeyDown for inputhandling, which are based in c++
It used to be that you could just get a reference to a BP and directly set/get the variable but now I have to create get and set functions in the BP itself. I often just create a custom function in the EventGraph for a set but a proper function for a get
A built in way to create this duality would be nice, or to be able to set a variable as gettable/settable etc