How do I Bullet and Enemy

Get help using Construct 2

Post » Mon May 09, 2016 9:00 pm

Hi. I am having some issues with the interaction between the player bullet ("Player_Rifle_Bullet") and the enemy ("Enemy_Air_Test").
When the bullet hits the enemy it should substract 50 from its health but it doesn't. I noticed that if I remove the enemy from the "MetalObjects" family than it work fine, but I need it in that family for some effects to take place.

Screenshot
Image
B
35
S
9
G
9
Posts: 207
Reputation: 6,805

Post » Mon May 09, 2016 9:22 pm

you have to substract health in line 244 at metal family.
I think with your code the bullet is destroy at 244 so it can't done the line 321 because the bullet doesn't exist for this line.
B
18
S
7
G
1
Posts: 56
Reputation: 3,000

Post » Tue May 10, 2016 8:14 pm

Yes, that seems to be the problem. In this case I will remove the enemy air from the "MetalObjects" family and apply the effects to the "Enemys" family; I will give it an instance variable of health and than it should work ...
B
35
S
9
G
9
Posts: 207
Reputation: 6,805


Return to How do I....?

Who is online

Users browsing this forum: Darth Crusher, David181, vaticant and 2 guests