How do I make my enemy corpses not consume bullets?

Get help using Construct 2

Post » Sat Feb 07, 2015 3:22 am

The way I have it set is that when the bullets collide with the enemy, it removes 1 health from the enemy, and destroys the bullet. Once the health is 0 for the enemy, it plays the death animation and destroys the object. But when the enemy is playing the death animation, it still destroys the bullets. How can I fix this without making it so when the death animation plays the bullets do not destroy on that object instance?
B
8
S
3
Posts: 39
Reputation: 642

Post » Sat Feb 07, 2015 7:12 am

Add a condition to the original event that basically says if the bullet collides and the dying animation is not playing subtract 1 health and destroy bullet.

So you'd basically want this kind of thing:

Image

You can right click on a condition and say invert to mean "not doing this"

Hope that helps
Last edited by Squeemish on Sat Feb 07, 2015 7:20 am, edited 1 time in total.
B
10
S
4
G
5
Posts: 137
Reputation: 2,979

Post » Sat Feb 07, 2015 7:14 am

or use health > 0 condition

don't forget to use For Each: Enemy and For Each: Bullet
B
16
S
7
Posts: 301
Reputation: 2,686

Post » Sat Feb 07, 2015 8:03 pm

Squeemish wrote:Add a condition to the original event that basically says if the bullet collides and the dying animation is not playing subtract 1 health and destroy bullet.

So you'd basically want this kind of thing:

Image

You can right click on a condition and say invert to mean "not doing this"

Hope that helps


Thank you so much for this! I really should've thought about animation conditions!
B
8
S
3
Posts: 39
Reputation: 642


Return to How do I....?

Who is online

Users browsing this forum: CJacobsSA and 15 guests