Health bar doesn't reflect actual health

Get help using Construct 2

Post » Mon Oct 10, 2016 3:08 am

I have 3 nests that take damage when hit by a bullet.the nest takes damage, and the health bar width is set using this formula
nest.health/NestHealth * healthbarFrontNest1.Width. The bar goes down, but the sprite sticks around long after the bar is solid red.

https://www.dropbox.com/s/xd0wv5g9o7ycn ... .capx?dl=0
B
16
S
7
Posts: 46
Reputation: 1,344

Post » Mon Oct 10, 2016 3:25 am

Sorry but I couldn't follow your events without expending too much time on it. Too much event sheet for just 200 events man. Use groups and sub-groups and just separate by event sheets when it's actually needed. It's way better in my opinion.

Also you aren't using the parameter in your action and the math is MaxBarWidth * yourpoints/yourMaxpoints.
B
56
S
21
G
3
Posts: 602
Reputation: 6,612

Post » Mon Oct 10, 2016 7:02 pm

Point taken. I'll look into that. Thanks.
B
16
S
7
Posts: 46
Reputation: 1,344

Post » Tue Oct 11, 2016 9:20 am

You should learn to use instances instead of so many different object types as well.
Again you are overcomplicating the overall game's logic with so many object types at the moment.

Then check the How do I FAQ for example of picking and check this tutorial on how to make a cooldown bar that can be used as a health bar as well.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
289
S
112
G
94
Posts: 7,333
Reputation: 69,293


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 12 guests