Game Maker Tutorial : Making Enemy Health Bars
Uploader Comments (pivotman999)
All Comments (74)
-
cant you just use the variables?
-
how can i do that if an enemy's hp is 0 that he changes in another object?
-
(sorry, noob comments...)
If you want the sprite to rotate, then instead of that draw sprite thing, use this:
draw_sprite_ext(sprite_index,i
mage_index,x,y,image_xscale,im age_yscale,image_angle,image_b lend,image_alpha) Credit goes to smash ball for this. =)
-
My fucking sprite won't rotate.
HOW does it rotate AND have a health bar?
It has to face obj_character. image_angle. And it won't work with the code you provided.
-_-
-
That was really helpful ,thanks. :)
Alhough, the fact that the enemy sprite goes away shouldn't have been a problem. :/
Good thing a gyu already explained how to fix that!
And I'll copy and paste just to be sure: (Remember, put this above the health bar draw thing.)
draw_sprite(name of your enemy sprite,0,x,y)
-
tut on testing chances with health i am making a rpg i need a chance for a critical attack and missing other wise he would own and be owned all the time!
-
@killerhumlan go to draw, then open the execute a piece of code and write in: draw_sprite(name of your enemy sprite,0,x,y).
whats wrong my enemy sprite is in the corner of the game while the hp bar is where the enemy sprite used to be??
killerhumlan 8 months ago
@killerhumlan Follow the tutorial again more closely. However, the bar just needs in the draw event just needs to stay above, I can't think write now watch it again lol :)
pivotman999 8 months ago
thanks so much but u forgot to show ppl how to subtract hp in collison with the bullet
hitpoints -= (1)
carkid123gamertag 9 months ago
@carkid123gamertag Oh did I? Sorry!
yes you are right, in the uploaders comments though you will see me say how to do it.
pivotman999 8 months ago
How do I make the health go down a certain amount?
darththork99 10 months ago
@darththork99 In the collision with the object health -= (amount)
or if its an object your constantly around,
(step event)
if distance_to_object(obj_ene) > (pixle amount)
{
health -= (amount)
}
pivotman999 10 months ago