Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

Game Maker Tutorial : Making Enemy Health Bars

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
6,827
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Mar 20, 2009

Game Maker Tutorial : Making Enimie Health Bars

Category:

Howto & Style

Tags:

License:

Standard YouTube License

  • likes, 10 dislikes

Link to this comment:

Share to:

Uploader Comments (pivotman999)

  • 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 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 :)

  • thanks so much but u forgot to show ppl how to subtract hp in collison with the bullet

    hitpoints -= (1)

  • @carkid123gamertag Oh did I? Sorry!

    yes you are right, in the uploaders comments though you will see me say how to do it.

  • How do I make the health go down a certain amount?

  • @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)

    }

see all

All Comments (74)

Sign In or Sign Up now to post a comment!
  • 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).

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more