Apply Enemy damage to player:
Open Enemy AI BP ,created in
In viewport, add arrow component, place at follow:
Modify Follow player custom node (after Play anim montage),
Promote variable (Object type) in sphere overlap actor, set Pawn in default value
Now enemy will apply damage to everything. To make it only valid to player, set Tag:
Go to 3rd person BP, add tag name as Player
Back to Enemy BP, add graph as below:
Apply Player damage to Enemy:
Go to Enemy BP
create float health variable (if not yet made)
Open a Widget for Enemy (scale down the frame just cover the bar), make the bar and create bind
Go to Enemy BP viewport, add widget component
Choose Widget Class, then put the health progress bar upward
To make the health bar always face to the camera:
In Enemy BP graph, event tick, add sequence: