T
The Last Random
Guest
Hey everyone,
having a wee bit of a problem drawing my health bar to screen_height.
here is the related code:
So the idea is that I want to draw the health bar to room height and still have it minus away depending on global.player_health, I just can't wrap my head around how to get it to draw to the room size without going over and still have it function as a health bar.
Any help will be appreciated!
Thanks.
having a wee bit of a problem drawing my health bar to screen_height.
here is the related code:
Code:
///obj_health_bar step event
gph = global.player_hp; //set to 100
rh = room_height; //currently 144, will resize later, needs to allow for that
hpp = //???
Code:
///obj_health_bar draw event
draw_sprite_ext(spr_hb_under,0,8,0,1,room_height,0,c_white,1); //this works as needed
draw_sprite_ext(spr_hb_over,0,8,0,1,hpp,0,c_white,1); //this is the draw event that I need help with
Any help will be appreciated!
Thanks.