Game Maker Tutorial – Custom Healthbars

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

Custom Healthbars

In this video we learn how to create custom healthbars to give your game a little more spunk! 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, and favorite.

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!

Follow me on Google+ to keep updated with all of my tutorials

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


Posted

in

by

Tags:

Comments

20 responses to “Game Maker Tutorial – Custom Healthbars”

  1. R33D PLAYS Avatar

    dude! health for the space bar?

  2. PIXEL GOOMBAH Avatar

    i want to know how to do lifes with this health how to?????????

  3. bambo oni Avatar

    help please i have problem in changing the space bar to a collusion btw my enemy and player

  4. Rhodey 'n' Rusty Avatar

    This isn't any help because you only show how to operate the sprite, not the hitpoints variable, so I don't know what to do there…

  5. Thrash Central Avatar

    for all you people that says that ++ dont work use += instead.
    ++ is for studio only(i think)

  6. Nexusrex Games Avatar

    im using gm8 so how can i change the ++ to another thing

  7. Last Noobn Avatar

    This works with standard edition right? Plus this will work with a 10 step animation, I'm guessing. (haven't watched the whole thing yet)

  8. HerpyDerp Roar Avatar

    still shows error on image_index++ what exactly did we do wrong?

  9. Rhakimdar Avatar

    Hey, thanks so much for this tutorial. It was really helpful. I actually have a question. I've been messing around with my own custom health bars in order to try and implement them into a game I wanna make. Its going to be an adventure game with inspiration from the popular Legend of Zelda series. I wasn't going to use hearts because I feel it doesn't fit, but I still wanted to implement "heart containers" to increase the players Maximum health. I managed to create a really neat health system thanks to your tutorial, but I can't seem to figure out how to increase the health bar.

    Currently my health bar is is a circular bar divided up into 12 segments with the lower left of the circle missing. Each bar has 2 hits, a dark green, and light green state allowing me to have a 'half heart' sense similar in Zelda. The bar starts in the top left and wraps around so the player would be starting with only 4 segments. I got the 4 segments working perfectly how I want them, but I cant seem to figure out how I would increase the bar to 5 segments (or more). I'm currently experimenting with it now to where I have separate sprites for each max health count. I'm trying to figure out how to make the game switch from the currently set health to the next one in code but like I said I'm not getting very far. I was wondering if you, or anybody in the comments, had any suggestions or ideas as to pull this off. If my description of the bar doesn't is hard to understand let me know and I can maybe show a picture. Thanks. Have a good one.

  10. Yawn Dying Avatar

    the image++; thing hasn't a clue what I'm talking about, I'm doing it right, it just won't wurk:/

  11. MineDiamond 8 Avatar

    Can't figure out how to put in a game

  12. kjomen Avatar

    There is a better way of doing it, instead of having 3 sprites and 3 max health, you can have as many sprites as you want( 3 works too) but have as much max health you want, and letting the image index show (maxhealth / sprites * health) this way it works also if in your game your maxhealth can increase but with the same sprites 🙂

  13. OG Vault Boy Avatar

    Just like the dead space health bar

  14. Venialias Avatar

    please help, in the code " if (image_index <= 9) image_index++; "
    I got a error that said "ERROR at line 1 pos. 33: Assignment operator expected"

  15. tuthamon Avatar

    Awesome Thank you… you made my day.. 🙂

  16. Jacob Bischoff Avatar

    well on my laptop not to

  17. Jacob Bischoff Avatar

    oh and when you post comments to my laptop, it shows no words

  18. im griff Avatar

    Yo Realtuts, you should do a Tower Defense tutorial!

  19. Chibisavv Avatar

    Some PRO tips:

    -If you want to create a bigger bar that actually recycles the life units, use a cycle (search for do until and for), this takes less than 2 variables and much less than 3 multiple choice (if, else), this ALSO makes easier to make life upgrades (let's say, make the lifebar bigger in game), this needs a hitpointsmax variable

    -Don't make a different object for every lifebar, make different variables for each lifebar.

    -Add the same if statment but reversed for values higger then the lifebar (if hp >=  3, hp = 3) so, if you want to add life refillers it won't bug

Leave a Reply

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