Solving the infamous 'collision picking' issue

Discussion and feedback on Construct 2

Post » Fri Feb 11, 2011 6:01 am

Thought you might be interested to know: in the latest release (27), the 'pick nth instance' system condition allows for a good way of working around the 'collision picking' issue. The problem usually is in the event 'Sprite collides with Sprite' (both objects the same), how do you make actions to affect just one of them?

Pick nth (which is 0 based, like everything else) in subevents can solve this:


Hurray, no more "how do I pick that instance" problems :)
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,478

Post » Fri Feb 11, 2011 6:19 am

Awesome, no more Family Trick :).
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Fri Feb 11, 2011 7:44 am

That sounds like a great solution to me. :) Much more intuitive than using families, I think.

I wonder if that case would fit some situations where there are multiple sprites colliding simultaneously. I think so, but I'm a bit fuzzy on whether something like this would be needed sometimes, or at all:

Sprite: on collision with Sprite:
- System: Pick Sprite instance 0 -> Do one thing...
- System: Pick Sprite all other instances -> Do another thing...

.
B
3
S
2
G
2
Posts: 187
Reputation: 1,449

Post » Sat Feb 12, 2011 9:59 pm

Awesome! Great job turning something complex into something simple. Thats actually my favorite definition of genius.
B
2
S
2
G
4
Posts: 124
Reputation: 1,698

Post » Sat Dec 01, 2012 7:43 pm

Argh! Images not showing up. I hope this is answered somewhere else too. ...trying to figure out how to make pick nth instance work.
B
9
S
2
Posts: 7
Reputation: 1,715


Return to Construct 2 General

Who is online

Users browsing this forum: TheRealDannyyy and 5 guests