Jump to content


Photo
- - - - -

Draw Healthbar Sprite


  • Please log in to reply
20 replies to this topic

#21 Thagrahn

Thagrahn

    GMC Member

  • GMC Member
  • 33 posts
  • Version:GM8

Posted 14 July 2012 - 02:27 AM


Pretty nice! I probably should have made my own healthbar. Bah, im too lazy. :tongue:

anybody know how to make it go horizontal instead?


After taking a quick look at his code, it's actually very easy to see how to switch between vertical( as it's done in the tutorial) to horizontal.

In the parameters of draw_sprite_part used in the draw event.
draw_sprite_part(sprite_index,image_index,0,0,37,Hp,x,y)
//draw_sprite_part(sprite_index,image_index,origin_x_value,origin_y_value,"How much to draw horizontally","How much to draw vertically",x,y)
"How much to draw horizontally","How much to draw vertically" amounts are in Pixels.

The custom value he made and the operators use in it create a value between the full with or height of the sprite to be drawn and Zero.

Edited by Thagrahn, 14 July 2012 - 02:28 AM.

  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users