How do I make the enemies not destroy at the same time?

Get help using Construct 2

Post » Thu Feb 26, 2015 8:44 pm

Hello everybody!
I've set an event so that every 2 or 3 seconds an enemy spawns. The problem is that when the player destroys one they all die (even if there's like 5 on screen).
How can I fix that?
Thank you in advance!
B
4
Posts: 11
Reputation: 222

Post » Thu Feb 26, 2015 8:50 pm

How is the player destroying the enemies? You can give the destroy event some condition to tell construct what enemy you want to destroy. Are you using a trigger?

Post a screenshot so we can see how you set up the events.
B
49
S
20
G
11
Posts: 696
Reputation: 10,881

Post » Thu Feb 26, 2015 9:26 pm

Anonnymitet wrote:How is the player destroying the enemies? You can give the destroy event some condition to tell construct what enemy you want to destroy. Are you using a trigger?

Post a screenshot so we can see how you set up the events.

Hello!
The player destroys the enemies when the player touches them. The enemy is a line (for now) and at the end of every side of the line there's 2 sprites that when they touch the player they kill it.
Image
B
4
Posts: 11
Reputation: 222

Post » Thu Feb 26, 2015 9:34 pm

you cant have more then one destroy events for the same object after the first one the object that the is associated with the condition get destroyed first then the next is making the rest get destroyed. unless those are other objects and we just cant see.
B
42
S
17
G
2
Posts: 850
Reputation: 6,209

Post » Thu Feb 26, 2015 9:41 pm

volkiller730 wrote:you cant have more then one destroy events for the same object after the first one the object that the is associated with the condition get destroyed first then the next is making the rest get destroyed. unless those are other objects and we just cant see.

Yes, those are other objects but since I'm testing if they destroy or not I painted them with a red color (normally they're transparent).
B
4
Posts: 11
Reputation: 222

Post » Sat Feb 28, 2015 12:24 pm

Hello everybody! I'm still not able to fix this, I don't know why it's doing it!
If you guys want I can post the capx file
B
4
Posts: 11
Reputation: 222

Post » Sat Feb 28, 2015 12:34 pm

Think that's a good idea :)
B
44
S
11
G
2
Posts: 1,181
Reputation: 6,816

Post » Sat Feb 28, 2015 12:52 pm

Here it is!
Last edited by Voskard on Sun Mar 01, 2015 5:48 pm, edited 1 time in total.
B
4
Posts: 11
Reputation: 222

Post » Sat Feb 28, 2015 6:18 pm

You have a picking problem, when the player collide with, for instant "Barritaentera" you destroy "Barritalzquierda" and "BarritalDereccha" as well. (Sick names btw :D) But you never pick which of these to destroy, so it just automatically pick all of them and then destroy them. You have to pick the correct ones of "BarritalDereccha" and "Barritalzquierda" as well, and the same goes for all of your "On collision" events.
B
44
S
11
G
2
Posts: 1,181
Reputation: 6,816

Post » Sat Feb 28, 2015 7:52 pm

nimos100 wrote:You have a picking problem, when the player collide with, for instant "Barritaentera" you destroy "Barritalzquierda" and "BarritalDereccha" as well. (Sick names btw :D) But you never pick which of these to destroy, so it just automatically pick all of them and then destroy them. You have to pick the correct ones of "BarritalDereccha" and "Barritalzquierda" as well, and the same goes for all of your "On collision" events.

Ohhh ok! And how can I pick which ones I have to destroy? Thanks for the tip btw :D
Regarding the names, haha they're in spanish as I am spanish! :D
B
4
Posts: 11
Reputation: 222

Next

Return to How do I....?

Who is online

Users browsing this forum: SebastianOs, stevecameron and 12 guests