Make a health system for everything in my game?

in my game i have a few things such as enemies, players and objects that will use a health value. is there any way to make some kind of global health function that can be applied to any actor or pawn ?

You probably want to look into “interfaces”, or the “on take damage” event. So whenever an actor (enemy, player, object etc) is damaged or hurt you would simply call the corresponding “damage event/interface” on the actor that was hurt and it should run its own script from within the BP. This is assuming you would have different things being hurt in different ways and with different damage amounts. If you had a very simple game where all damage is the same regardless of who it was applied to you then things might be even simpler. But that would be my thoughts for you.

i believe the closest thing in blueprint would be the apply damage and event any damage nodes, though you would still need to create health functionality on each actor. that is unless you can modify a parent class. theoretically if you had the know how you could add the functionality to a class like actor which all the items listed would inherit from, but that would likely involve some serious C++ and modifying the engine itself.