J
jacksu456
Guest
I have a little problem with a custom healthbar that i made, its not the simple square healthbar, its like a gun symbol, so i made a 100 animations of the healthbar going down in a single sprite because my player has 100 health points, so, i just want it to go down every time an enemy collides with the player (in the animation order), but i cant seem to figure it out, i already made the code so that when the enemy collides with me, he hurts me so thats -1 point everytime im colliding with the enemy, but i cant seem to know how to make my bar go down with my 100 animations, im stuck pls help thanks
This is the code i've been doing in obj_hp
The fill has 100 sprites more inside it, and the empty thing, is just the hp hud, its put to be inside it, i need to have a way so it can play the sprites 1 by one each time an enemy collides with me because thats 1 point less
This is the code i've been doing in obj_hp
Code:
draw_sprite(spr_hp_fill, 1, view_xview[0]+85view_yview[0]+36);
draw_sprite(spr_hp_empty, 1, view_xview[0]+90, view_yview[0]+40);