How do I destroy individual platform enemies

Get help using Construct 2

Post » Mon Jul 31, 2017 2:13 am

How do I make it so when the player jumps on an enemy it only destroys the enemy that they jumped on? Currently, I have multiple enemies spawning from an object and if one of them is jumped on they all are destroyed. Please help!

Link to CAPX: https://drive.google.com/file/d/0Bx3kU1 ... sp=sharing
B
26
S
8
G
4
Posts: 68
Reputation: 4,424

Post » Mon Jul 31, 2017 8:10 am

It's because you're picking the hurtbox and then destroying a hurtbox and enemy so the hurtbox is picked correctly as the one you jump on but then you are saying destroy all enemies. You can fix it by putting the hurtbox in a container with the enemy and remove the destroy enemy action. This will then destroy the hurtbox but also the enemy that is attached to it. Another way is to relate the hurtbox to the enemy with a variable ID and destroy the ones that match but a container should be easier.
B
47
S
18
G
84
Posts: 2,261
Reputation: 49,776


Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 7 guests