Draw Healthbar Icon Draw Healthbar

With this action you can draw a coloured bar to show a graphic representation of a value. The amount to be displayed is a percentage value and must fall within the range of 0 - 100, however you can still uses larger values with the formula (CURRENT_Value / MAXIMUM_value) * 100, so, for example, you can use this to display power, health, mana, time or anything else that would benefit from a bar display. Apart from the value to draw you can set the direction anchor for drawing the healthbar too (from left-to-right or right-to-left and top-to-bottom or bottom-to-top) as well as the position, either within the room or relative to the instance calling the action. Apart from the position you can also set the colour to be blended from each of the four corners of the healthbar, creating gradients from red to green (for example, but you can use any colours). Below you can see an image of how a simple healthbar looks with the different options:

Different Healthbar Settings

NOTE This action is only for use in the various Draw Events, and will not draw anything if used elsewhere.

 

Action Syntax:

Draw Healthbar Action

Arguments:

ArgumentDescription
DirectionThe direction to draw the healthbar contents
ValueThe value (between 0 and 100) to use for the healthbar
LeftThe position of the left side of the healthbar
TopThe position of the top of the healthbar
RightThe position of the right side of the healthbar
BottomThe position of the bottom of the healthbar
BackgroundThe colour to draw as the background on the healthbar
OutlineThe colour to use to outline the healthbar
Min ColourThe colour to blend from the minimum value
Max ColourThe colour to blend from the maximum value

 

Example:

Draw Healthbar ExampleThe above action block code draws a blue and yellow "mana" bar relative to the instance.