Destroy any sprite that collide with a specific...

Get help using Construct 2

Post » Mon Nov 12, 2012 1:10 pm

How to determine that "any" object that collides with one specific object, be destroyed? This program should be in a single event. Is this possible?
B
65
S
13
G
2
Posts: 969
Reputation: 6,732

Post » Mon Nov 12, 2012 1:35 pm

Place all collidable objects in a family, then check for collision of that family with the specific object and finally destroy the family member.
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155

Post » Mon Nov 12, 2012 3:56 pm

Its a good solution, but I need one for free version.
B
65
S
13
G
2
Posts: 969
Reputation: 6,732

Post » Mon Nov 12, 2012 9:41 pm

If its your player object colliding with countless other objects, you can run a check with the object they collide with to see if its the player object, and then react appropriately.

eg: on collision with other object.
for each instance (ordered)
if object = player -> cause damage

there might be a lot of un nessesary collisions that take place that it will calculate though. like if a pile of boulders were colliding with each other all the time.
B
50
S
21
G
8
Posts: 844
Reputation: 10,299


Return to How do I....?

Who is online

Users browsing this forum: anty21ro, Magistross, mallorcaredes, PavleNikolic and 25 guests