How can I set up a health bar that can continually lose health when attacked by an enemy.
Good Morning !
i try to help here a bit i guess you want to achieve a bleeding or burning effect for your character right?
so here is what i have done :
-tick note and begin overlap of a sphere or box or capsule on the Enemy side( enemy player, burning wood etc.)
then u compare the hit actor if it is the player character and branch it (because it will cast right in the beginning because it is overlapping the floor probably) this goes into the gate
NOW: drag a sequence,
first entry is a delay Which controlls HOW LONG the Dot works
Second Enry is a delay (here 1 sec) which describes the intervall the damage is castet
then u simply connect the first delay to close the gate again , and the second delay goes into a apply damage function where the other actor is the player character (and other characters!, if you only want to get the player damage simply drag the player character instead of other actor.
hope i could help here!
for the health at itself i would recommend Unreal Engine 4 - Creating a Health Bar and Health Regen - YouTube this tutorial (if you create a blueprint you can choose(new blueprint and search for widget blueprint, it should called “userWidget”).