How do I destroy 2nd object in collision

Get help using Construct 2

Post » Wed May 20, 2015 6:48 pm

So there is picture and capx with my new problem. Two same obiects collide with each other but they must have 2 identified text vairables. How do I destroy them both?

Image

https://www.dropbox.com/s/vgvvmm3kbvgw7zs/pickinginstanceoncolide.capx?dl=0
B
9
S
3
G
3
Posts: 36
Reputation: 2,433

Post » Wed May 20, 2015 7:48 pm

Didn't download your capx but I've encountered a similar problem so i'll try to help.

Line 1 : remove npc destroy action
Line 2 : no change
Line 3 : duplicated line 2, change instance to 1

Source: https://www.scirra.com/manual/124/system-conditions
Section Pick Nth instance

Now what if the running npc collides with 2 npcs at the same time on the same tick and you have to destroy all three.
Idk? Is that possible idk? Is there a system expression showing how many instances of a trigger are created per tick, idk?
B
5
S
1
Posts: 9
Reputation: 345

Post » Wed May 20, 2015 9:06 pm

I try it, dont work. I wanna make that turtle from mario, when he is hiden in shell, sliding around and hitting all enemies on way.
B
9
S
3
G
3
Posts: 36
Reputation: 2,433

Post » Fri May 22, 2015 7:51 am

I still can't get it work with out creating new sprite for it. Anyone know how to do/fix it?
B
9
S
3
G
3
Posts: 36
Reputation: 2,433

Post » Fri May 22, 2015 8:07 am

From the above events it is unclear to me what you want to happen.

What I do see is that you are trying to pick an npc with action="walk" form an earlier pick of npc with action=run, which seems impossible..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Fri May 22, 2015 8:15 am

Ok, 1 NPC is running. When he colide with one that is walking, they both die (destroy).
But if I just leave 'when npc colide with 2nd npc' then 2 walking one will die on collision and I dont want that. 1 need to run and other need to walk.
So now, how do I destroy npc that colide with running npc.
B
9
S
3
G
3
Posts: 36
Reputation: 2,433

Post » Fri May 22, 2015 8:30 am

This should work to destroy both objects in the collision, only when one of them is running..

Image
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Fri May 22, 2015 8:40 am

Nope, it kills random walking one, not one that is in colision with running one.
B
9
S
3
G
3
Posts: 36
Reputation: 2,433

Post » Fri May 22, 2015 8:47 am

Roal465 wrote:Nope, it kills random walking one, not one that is in colision with running one.


Really strange, because I don't have that problem in my capx, not even when trying 25 times..
Are you sure you've recreated my event exactly like above?

My capx
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Fri May 22, 2015 9:05 am

https://www.youtube.com/watch?v=LhOY0PnmuBU

Dont work, you can see in that small video.
B
9
S
3
G
3
Posts: 36
Reputation: 2,433

Next

Return to How do I....?

Who is online

Users browsing this forum: AnD4D and 42 guests