Just my simple health bars, i aimed for them to be similar to the CEM meter.
void DrawHealthBar ( UCanvas* Canvas, APawn* Pawn, FLOAT X, FLOAT Y ) { float Health = Pawn->Health; /** * You may change these to adjust the size of the healthbars * and their tiles, however if you wish to have more or less * individual health bar tiles you will need to adjust the * colours array (order is important) and also the for loop below **/ int boxSizeX = 2; // you can fiddle with the box size and gap between them int boxSizeY = 6; int boxGap = 1; FColor colours[] = { ColorRed, ColorRed, ColorRed, ColorRed, ColorOrange, ColorOrange, ColorOrange, ColorOrange, ColorYellow, ColorYellow, ColorYellow, ColorYellow, ColorGreen, ColorGreen, ColorGreen, ColorGreen, ColorGreen, ColorGreen, ColorBlue, ColorBlue }; // this is our order for ( int i = 0 ; i < 20; i++ ) { if ( Health > ( 5 * i ) ) Canvas->;pCanvasUtil->DrawTile( X, Y, X+boxSizeX, Y+boxSizeY, 0, 0, boxSizeX, boxSizeY, 0, (UMaterial*)WhiteTexture, colours[i], 0 ); else Canvas->pCanvasUtil->DrawTile( X, Y, X+boxSizeX, Y+boxSizeY, 0, 0, boxSizeX, boxSizeY, 0, (UMaterial*)WhiteTexture, ColorGrey, 0 ); X = X + boxSizeX+ boxGap; // will move to next tile 1 unit to the right } }
Unreal Health Bars In Action: These are my health bars for unreal engine games, hope you enjoy them
Enjoy

Comments
Hey thanks a lot for this new
Hey thanks a lot for this new information it's real good to know.