Game Maker Tutorial – Healthbars

[ad_1]
Brand new 2017 Game Maker Studio: 2 Course available right now

Game Maker Tutorial Healthbar

In this video we look at creating a healthbar that stays above your players head. Healthbars are crucial for any game and this is how you do it. If you have any questions then be sure to leave a comment or contact me on twitter; realtutsgml. If you learned something then be sure to leave a like, comment, favorite and maybe even a share.

Have you ever wanted to create games? Have you ever gotten fed up with it being to difficult? Well now is the time to thank me and possibly subscribe because you have just found the channel for you! Game Maker Tutorials, Java Game Programming, Unity3D Tutorials, Batch, C++ and much much more! This is the channel for you, the one stop shop for an exploration of your hidden talent as a game developer. Unleash your potential and go wild with imagination when you finally figure out how to make any game you want!

Visit CodingMadeSimple for more exclusive tutorials and get the help you need to succeed as your very own indie game developer!

Follow me on twitter for exclusive content and interaction with me!

Game Maker Studio: Programming
Game Maker Studio: Tutorial
Java Programming
Game Programming
Game Tutorial
Programming Tutorial


Posted

in

by

Tags:

Comments

22 responses to “Game Maker Tutorial – Healthbars”

  1. computercrabs Avatar

    You don't even sound like RealTutsGML…

    You must go back in time and redo this tutorial :p

  2. brandon perro Avatar

    Thanks brother, old but still works!

  3. ᚠᛃᛟᚱᛞᚢᚱ Avatar

    Is there anyway to make enemies and player health bars? If I shoot my enemies in my game, I lose health too 🙁

  4. Skritcher Avatar

    so…what if i am creating a twoplayer game? i doesnt work…if one of them loses life, the other one loses the same :/

  5. JKingJay Avatar

    Urshit cheeses me. The heel doesn't it work

  6. Rubbish Ambush Avatar

    What if I want the health 100,000

  7. Cobey Smith Avatar

    i love how short and simplistic your videos are! so little time but so informative! 🙂

  8. supbrotv Avatar

    heres an easier method of setting the health in the inside the player>create enter code health = 100..then with collision to enemies enter code health -=2 then in the step event enter this code "if health =0 {game_restart()}"

  9. Safa Moin Avatar

    you have a new subscriber…easy to understand and generally an awesome tutorial! 😀

  10. Anish Shenwai Avatar

    thanks for the help, but i finished this thing a while ago.

  11. HuskyHax0r Avatar

    Try this:
    if health < 1
    {
    score = 0
    }
    Note: I haven't tried this yet.

  12. Anish Shenwai Avatar

    thanks for the awesome tuts, but i just wanted to ask how i can set the score to 0 if you lose

  13. Jordana Divinorum Avatar

    Ok, thanks man. Your videos are really helping me understand the game maker. What worked for me was setting global.bosshealth and then putting this in the draw event. draw_healthbar(obj_boss1.x,obj_boss1.y-40,obj_boss1.x+120,obj_boss1.y-30,global.boss1health,c_gray,c_red,c_green,10,true,true)

  14. RealTutsGML Avatar

    make sure the variable you are using in the draw_healthbar() function is the same variable you made in the create event.

  15. Jordana Divinorum Avatar

    Oh okay. I'm kinda stumped. I understand that there is a universal health variable that they use for the bars. How would I write the code? draw_healthbar(view_xview,view_yview,view_xview+120,view_yview+18,HITPOINTS,c_gray,c_red,c_green,10,true,true). It says "unknown variable – hitpoints when I try that. I also want the health bar to follow the boss. Thanks for your help man.

  16. Jordana Divinorum Avatar

    Okay thanks. I'm guessing you can't do that in the "draw the health bar" command on the score tab?

  17. RealTutsGML Avatar

    create a seperate variable called like hitpoints = 100; and use hitpoints when drawing the healthbar

  18. Jordana Divinorum Avatar

    Hey quick question. For the healthbar on the enemy, how do you link that health bar to the variable that keeps track of their health?

  19. Jordana Divinorum Avatar

    You should be able to. I'm trying to do that right now but it's not working yet.

Leave a Reply

Your email address will not be published. Required fields are marked *