How do I check for multiple collisions on the same object?

Get help using Construct 2

Post » Mon Jun 16, 2014 10:38 am

My current project has a Bullet object, which gets destroyed if it collides with another bullet (so far so good). What I want is to check when 3 bullets collide and make something special happen (like a big explosion). So far I haven't found a way that doesn't involve having a collision count variable that resets after a short amount of time (say, dt) and checking if it reaches a certain value. Somehow I don't think that's a very good solution, given that it's not impossible for 2 different pairs of bullets to collide at the same time, which is not what I want to check for.

Any ideas?

PS: I also tried comparing Bullet.PickedCount to 3 on the "On Collision" event, but it didn't work. When 3 bullets collide, all of them get destroyed, so I'm guessing that the engine treats the triple collision as 3 separate "On Collision" events
B
6
S
2
Posts: 79
Reputation: 608

Post » Tue Jun 17, 2014 11:13 pm

When you have a collision you could check the colliding bullet to see if it is overlapping more than 1 other bullet.
B
20
S
6
G
4
Posts: 347
Reputation: 4,451

Post » Wed Jun 18, 2014 12:10 am

Hi, thank you for your reply

How would that event look? I'm trying to picture it but can't
B
6
S
2
Posts: 79
Reputation: 608


Return to How do I....?

Who is online

Users browsing this forum: blue visionary, OBLIVION and 15 guests