RPG health/mana bar

For questions about using Classic.

Post » Sat Oct 02, 2010 12:18 am

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?
B
3
S
1
G
3
Posts: 105
Reputation: 1,312

Post » Sat Oct 02, 2010 1:03 am

Look who's still around. Dude you have a PM sitting in your mailbox for several months now... 8)

[quote="Chezzy":1zsf03a5]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?[/quote:1zsf03a5]

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. :P
B
21
S
6
G
10
Posts: 1,024
Reputation: 7,445

Post » Wed Oct 06, 2010 11:48 pm

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 :)
B
3
S
1
G
3
Posts: 105
Reputation: 1,312

Post » Sat Oct 09, 2010 8:58 am

Oh thanks a lot, I was wondering how you can do that... I tried a lot of times xD. Thanks ;-) !
B
6
S
1
G
3
Posts: 61
Reputation: 1,072


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 3 guests