How Do I Set Up A Basic Blueprint Health System For A Player?

really if you are working with health and damage you shouldnt be checking it in tick as is saying. most of the time you use tick for something that needs to be kept tabs of constantly.

Now I know you might be thinking well health needs to be kept tabs of all the time and youre right and wrong in time sense. You only need to know what your health is when something HAPPENS to make it change.

So on this line of thinking you should use the ONTAKEANYDAMAGE to provide you with a check to when your health changes. Also if you are giving health its kinda the same thing.

Heres and example of a simple setup for health

so here you have a simple setup with one variable representing the health AIHEALTH which can be a float or int and whenever damage is detected it checks to see if the health is still above zero otherwise it destroys the actor.
Also it applys the damage to the actor by how much damage was received during that event.

1 Like