How do I find both the nearest and the second nearest?

Get help using Construct 2

Post » Fri Jul 24, 2015 1:42 pm

I've been using "pick nearest" successfully. But now I need to pick the two nearest elements. Any suggestions for the most elegant way to do this? Thanks!
B
4
Posts: 5
Reputation: 217

Post » Fri Jul 24, 2015 1:48 pm

For each ordered ascending, using a distance() call as the expression. Add a stop loop if loopindex = 1 to limit the number of iteration to two.
B
78
S
32
G
27
Posts: 1,021
Reputation: 20,952


Return to How do I....?

Who is online

Users browsing this forum: sizcoz, vankizzle and 60 guests