How do you do HP bars?

For questions about using Classic.

Post » Wed Oct 28, 2009 11:16 am

Hmm yeah this community rocks. :shock:
B
10
S
5
G
8
Posts: 203
Reputation: 4,395

Post » Wed Oct 28, 2009 11:43 am

this thread has some interesting examples:
[url:1sw8zyso]http://www.scirra.com/phpBB3/viewtopic.php?f=3&t=4736[/url:1sw8zyso]
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Wed Oct 28, 2009 10:52 pm

[quote="newt":1sjq4yec]Don't forget about the line object, the gradient object, the tiled bg object, the box object.......[/quote:1sjq4yec]

don't forget the sprite font too!
B
134
S
65
G
16
Posts: 1,765
Reputation: 19,188

Post » Wed Oct 28, 2009 11:18 pm

Or a distort map, I've used it for that before.
Image Image
B
161
S
48
G
90
Posts: 7,347
Reputation: 66,749

Post » Thu Oct 29, 2009 8:46 pm

Hmm. I have it set up like this right now:

Player_healthbar: Set width to Clamp(Player.value('HP') / 3, 0, 30)

(Player.value('HP') / 3
defines the width of the bar.

, 0 = minimum value
, 30 = maximum value

You can clamp the Player HP Private Variable as well, so that it never goes over 100.
B
6
S
2
G
3
Posts: 520
Reputation: 2,690

Post » Fri Oct 30, 2009 1:17 am

I use sprite font for these types of HUD bars:



I just go always: showtext: left( "aaaaaaaaa", hpvalue)

where "a" represents a sprite for one HP slot thing, then it only shows X amount of the "a"s from the left.
B
134
S
65
G
16
Posts: 1,765
Reputation: 19,188

Post » Fri Oct 30, 2009 1:44 am

alspal: That screenshot is badass!

These are some awesome examples of Health bars. Thanks guys!
B
8
S
3
G
7
Posts: 835
Reputation: 5,313

Previous

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 4 guests