Fandom

Game Maker

Action draw health

281pages on
this wiki
Add New Page
Talk0 Share

action_draw_health(x1,y1,x2,y2,backcol,barcol); executes the action Draw the health bar. It is similar to the function draw_healthbar.

backcol is the background color of the health bar. Values for backcol go from 0 to 16. A value of 0 or lower causes the background to be invisible, while 17 or higher make the background green (or lime). The values for backcol cause the following effects:

  • 0 or lower = invisible,
  • 1 = black, 2 = gray, 3 = light gray, 4 = white, 5 - 16 = game maker's preset colors,
  • 17+ = green.

barcol is not just the color of the health bar, but also some effects, listed from 0 health to 100 health. Unique values for barcol range from -1 to 18. The values for backcol cause the following effects:

  • -1 or lower = black to yellow,
  • 0 = red to green (lime),
  • 1 = black to white (grayscale)
  • 2 = black, 3 = gray, 4 = light gray, 5 = white, 6 - 17 = game maker's preset colors,
  • 18+ = black.


Code Sample Edit

action_draw_health(x1,y1,x2,y2,backcol,barcol);

See Also Edit

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.