Drawing a healthbar for an enemy
Posted 03 March 2012 - 12:47 AM
Posted 03 March 2012 - 01:31 AM
draw_healthbar(x1, y1, x2, y2, amount, backcol, mincol, maxcol, direction, showback, showborder) With this function you can draw a healthbar (or any other bar that indicates some value, like e.g. the damage). The arguments x1, y1, x2 and y2 indicate the total area for the bar. amount indicates the percentage of the bar that must be filled (must lie between 0 and 100). backcol is the color of the background for the bar. mincol and maxcol indicate the color when the amount is 0 and 100 respectively. For an amount in between the color is interpolated. So you can easily make a bar that goes e.g. from green to red. The direction is the direction in which the bar is drawn. 0 indicates that the bar is anchored at the left, 1 at the right, 2 at the top and 3 at the bottom. Finally showback indicates whether a background box must be shown and showborder indicated whether the box and bar should have a black border line.
Posted 03 March 2012 - 01:35 AM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users