How do I make enemy health bar

Get help using Construct 2

Post » Tue Mar 29, 2016 2:23 pm

ok here is what i would like to do
having a way to spawn enemy but on spawn they also come with their life bar
likebar background would be black
but the bar would start from green to red depending on how much life is remaining
its for a TD :) i need a way to do it
B
27
S
9
G
3
Posts: 136
Reputation: 3,750

Post » Tue Mar 29, 2016 4:32 pm

I made an example project for you
Image
Here you can see the exported version http://bit.ly/1Sub5nJ
Here is the capx http://bit.ly/1ojQAPN
B
19
S
7
G
3
Posts: 28
Reputation: 2,438

Post » Tue Mar 29, 2016 4:45 pm

awwwwwwww I love ya :D ty sooooooo much
B
27
S
9
G
3
Posts: 136
Reputation: 3,750

Post » Fri Apr 01, 2016 1:18 am

well there is a problem since my enemies have 25 hp
it made it look not nice on enemies with more hp

but we have changed the script well my friend did since hes a c++ coder he know more then i lol

param 1 is spr_jeep.Health / spr_jeep.MaxHP * 150
param 0 is 250 - (spr_jeep.Health / spr_jeep.MaxHP * 250)

that way ... no mater the life of the enemy itll work the same :)
but thx a lot it pushed me up :D
B
27
S
9
G
3
Posts: 136
Reputation: 3,750


Return to How do I....?

Who is online

Users browsing this forum: ezgaming420, marcinkowski and 3 guests