AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Game maker studio 2 animated health bar8/25/2023 ![]() ![]() I am having trouble figuring out how to make each layer do this independently of each other. To summarize, I need the gauge to remain full if the player's current HP is equal or greater than its respective range's maximum, be empty if it is less than its increment range's minimum, and scale between empty and full proportional to where hp_current lies between said layer's maximum and minimum values. So far I can get the first layer to work out just fine: draw_sprite_ext(sprite931, -1,0,0,(min(30, hp_current)/30),1,0,c_white,1) īut I am having some difficulty calculating the xscale argument for the layers representing hp_current values 31-40, 41-50, 51-60, etc. If you are familiar with the Mega Man Zero games, and how some bosses in that game had extra health represented in "layered" health bars that decremented independently of and sequentially to each other, I am basically trying to make that, just using a different health increment for all layers beyond the first. ![]() I want to represent this graphically by adding a different-colored overlay to the character's health bar for each additional 10 points added, with the last layer added diminishing before the ones behind it, proportional to how much of the last "extra" 10 points remains. I am currently working on a game in Game Maker Studio 2 where the player character is capable of increasing their maximum health beyond a starting value of 30, by increments of 10. ![]()
0 Comments
Read More
Leave a Reply. |