Health bar Help

TJMNUTTJMNUT Member Posts: 236
edited November -1 in Working with GS (Mac)
I followed TSB's tutorial on making a health bar, but I only want it so you can only be hit 4 times. I tried altering it, but the health bar was so small. What do I have to do to have a nice size, but only take 4 hits?

Comments

  • DrGlickertDrGlickert Member Posts: 1,135
    Make it worth 100, but every time you're hit you "lose" 25.

    So, game.PlayerHealth = 100

    Rule; If player gets hit; Change Attribute game.PlayerHealth to game.PlayerHealt-25

    That should give it a lot more size.
  • TJMNUTTJMNUT Member Posts: 236
    what do i make the index attribute worth, and what do I make the height and width?
  • RedlerTechRedlerTech Member Posts: 1,583
    same as the video.
  • TJMNUTTJMNUT Member Posts: 236
    It's still not working, every time the health bar is supposed to down, it just completely goes away
  • DrGlickertDrGlickert Member Posts: 1,135
    TJMNUT, if you want to send me the file I'll take a look at it for oyu. DrGlickert@gmail.com is my email address.
  • TJMNUTTJMNUT Member Posts: 236
    what is the size I need to make the bar, that's all I need to know
  • DrGlickertDrGlickert Member Posts: 1,135
    What size do you want to make the bar? I don't think there is a predetermined size or anything like that. You really can make a health bar as large or as small as you want it. You can make it into a health "pie" or whatever you desire.

    If you want it to be the entire length of the landscape then make it 480. If you want it to be just a section, make it 100...

    Not sure what you mean by what size do you 'need to make the bar'
  • SkyMapleSkyMaple Member Posts: 817
    just make sure its divisible by what ever your subtracting. So say you want it to subtract 25%, the easiest way to do it is to use 100. 100-25%=75 (25% of 100= 25). or if you wanted to use 200px. 25% of 200 is 50px.
Sign In or Register to comment.