Question about health bar

Get help using Construct 2

Post » Sun Oct 25, 2015 7:01 pm

Hi everyone. How to make one healthbar to all layouts?. For example if I have in the first layout health bar with value 5 and i got hurt once , how to make that in layout 2 I will have health bar with value 4?
B
8
S
3
Posts: 100
Reputation: 1,023

Post » Sun Oct 25, 2015 7:17 pm

If you use global variable for health , that will cover all layouts. Then set healthbar width to variable.
B
28
S
6
G
2
Posts: 86
Reputation: 3,267

Post » Mon Oct 26, 2015 6:26 pm

Gweely wrote:If you use global variable for health , that will cover all layouts. Then set healthbar width to variable.


thanks :)
B
8
S
3
Posts: 100
Reputation: 1,023

Post » Tue Oct 27, 2015 2:01 am

Yeah and if you want a long healthbar, you could do Every tick> Set "My healthbar" height to "HeathVariable * 100". then you could do like weapon-specific damage
B
22
S
7
G
1
Posts: 90
Reputation: 2,045

Post » Wed Oct 28, 2015 4:59 am

another thing you can do is if you are doing a UI with a health bar on the layout you can use Layer and set it for global and all you have to is add that Layer exact name
B
52
S
24
G
6
Posts: 391
Reputation: 7,845


Return to How do I....?

Who is online

Users browsing this forum: blue visionary, OBLIVION and 15 guests