Gasil
Member
Hello, I need a little clever way to do the following:
I am using a custom healthbar I drew, using this code:
I am using draw_sprite_ex on the healthbar so I can manipulate its width with image_xscale; it works fairly well and I'm content, however the healthbar of course depletes in chunks whenever the player takes damage.
I was trying to think in a way to make it shrink gradually like the built-in healthbars GM2 offers, but my logics fail me and I can't come up with a method to do so.
Could you help me please with any ideas to achieve that?
Thank you.
I am using a custom healthbar I drew, using this code:
Code:
///The empty representation of the bar, the background.
draw_sprite(spr_salud_fondo, 0, view_xport[0], view_yport[0]);
///The actual healthbar.
draw_sprite_ext(spr_salud_barra, 0,view_xport[0] + 60, view_yport[0] + 40,
obj_player.Salud / obj_player.maxSalud, 1, 0, c_white, 1);
///The border and health icon.
draw_sprite(spr_salud_borde, 0, view_xport[0], view_yport[0]);
I was trying to think in a way to make it shrink gradually like the built-in healthbars GM2 offers, but my logics fail me and I can't come up with a method to do so.
Could you help me please with any ideas to achieve that?
Thank you.