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
11
S
5
G
8
Posts: 203
Reputation: 4,440

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
100
S
21
G
12
Posts: 3,259
Reputation: 16,919

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
151
S
75
G
20
Posts: 1,793
Reputation: 22,749

Post » Wed Oct 28, 2009 11:18 pm

Or a distort map, I've used it for that before.
Image ImageImage
B
170
S
50
G
179
Posts: 8,378
Reputation: 113,425

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
151
S
75
G
20
Posts: 1,793
Reputation: 22,749

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 14 guests