How do I make health bar for all enemies?

Get help using Construct 2

Post » Wed Jan 28, 2015 7:19 am

I want to make health bar for every enemy unit spawn. I read in another post and put the health bar in container. However, when a unit is attacked, all health bars from all units are affected. How do I make it that only the attacked unit health bar is changed? I don't have the capx right now so I'll try to describe what I did. I used a Monster family.

Bullet on collision with Monster ==> set width Healbar = Monster.HP
B
7
Posts: 20
Reputation: 293

Post » Wed Jan 28, 2015 7:53 am

I can't till you the events to use but i can tell you the reason this is happening is because you don't reference your Heal-bar in your conditions so it affects all of them. sorry wish i could link a capx but im on mobile. i believe there is a tutorial on this if you search the tutorial section of the website
B
42
S
17
G
2
Posts: 850
Reputation: 6,209

Post » Wed Jan 28, 2015 8:23 am

^ How do I refer to the health bar of the attacked unit?
B
7
Posts: 20
Reputation: 293

Post » Thu Jan 29, 2015 11:59 am

I have made a lot of health bar stuff. I might be able to help. However i don't have a capx for you at the moment, but imma try help you when i get home.
B
9
S
2
Posts: 41
Reputation: 1,756

Post » Fri Jan 30, 2015 4:53 am

thank you. If you can send me a sample capx that would be great.
B
7
Posts: 20
Reputation: 293

Post » Sat Jun 27, 2015 5:34 am

@hsm4ever have you solve the problem? I got the same question like yours
B
11
S
3
Posts: 172
Reputation: 1,178


Return to How do I....?

Who is online

Users browsing this forum: Laura_D, Tombas and 24 guests