Be the first to post for 'Enemy Floating Health Bar'!



Anyway I did a total mix salade.

So I have to add enemy canvas inside each enemy, and do the same with the script Enemy.cs ?


Maybe it is better if i restart from zero :smiley:

Dont worry, I dont leave yourr course!!



Yeah, there should be a canvas for each enemy and, each enemy should have the health bar script.

Might be worth flicking back to the appropriate lecture just to be sure you don’t miss anything.

Do make sure you make the changes on the prefabs though, or at least update them from the Hierarchy otherwise you will end up with some enemies with and some without the health bars.

I don’t think you necessarily need to start from the beginning again, maybe go back to the specific lecture about the healthbars and just go through that one again. :slight_smile:


Just a small change to the size and colour for me - just to bring it in line with the same theme as the player. Not 100% sure I’m happy with it, but I’ll stick with it until I confirm an art style I reckon.


Ok, fast on this one, as I’ve done it in previous lesson …

Adding the bars to my flying enemies :


My health bars, i added player stamina and morale bars to the main canvas too.


My player healthbar drops in health to the left but the enemy healthbars drop in health to the right.
Any suggestions?
Also, the enemies would kill themselves as they shot at me before lesson 64. Now, nobody gets injured (enemies, players) upon change in the projectile script



Used Red for the Enemy Health Bars, floating right above their head.