Friday, 11 May 2018

Enemy Health Implementation

To create an enemy with a floating health bar, I first had to create a UI Widget with a progress bar in it to represent the health.



Then in the enemy blueprint, I added a Widget element above the head for the health bar widget to go into.



And here is the code inside the enemy which updates the widget and checks if they are dead.