RPG health/mana bar

This forum is currently in read-only mode.
From the Asset Store
Can be used in Games as Mana,Potion,Special Power, Health Pickup
  • I'm trying to make a health bar and a mana bar for my game. The bar is 100 pixels wide at max, but the player health can be from 10 to 500 health depending on their level. As long as Playerhealth is the same as Maxplayerhealth, the bar should be full (100 pixels). What is the easiest way for me to do this?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Look who's still around. Dude you have a PM sitting in your mailbox for several months now...

    I'm trying to make a health bar and a mana bar for my game. The bar is 100 pixels wide at max, but the player health can be from 10 to 500 health depending on their level. As long as Playerhealth is the same as Maxplayerhealth, the bar should be full (100 pixels). What is the easiest way for me to do this?

    Well, what you're requesting has been discussed a few times. Here's a basic example:

    http://dl.dropbox.com/u/2306601/health500.cap

    You can change your maximum health with the global variable MaxHealth. You'll see it'll always work properly with the size of the health bar. And all it needs is some very simple math.

    Here's also an older and slightly different example I made for a similar thread: http://dl.dropbox.com/u/2306601/healthhelp_002.cap

    Just to really bring the point across I guess.

  • Thanks PixelRebirth, I can use this

    I've been off and on with construct for the past year due school and other personal things in my life, I'm just getting back into it now. I didn't notice that PM, sorry! My old projects are pretty much dead now. But rest assured, this project I'm working on now is much deeper and more planned out. At the moment I'm just working out some stuff (like this health bar) but I'll probably make a development thread soon.

    Again, thanks for your help

  • Oh thanks a lot, I was wondering how you can do that... I tried a lot of times xD. Thanks !

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)