Picking a sprite instance by comparing Y values

Get help using Construct 2

Post » Sat Jan 16, 2016 6:08 pm

I have multiple instances of the same sprite in the layout. How do I pick the one that is vertically highest on the screen (smallest Y value)? I'm sure there must be a super easy way to do this, but I just can't figure it out for the time being..
B
32
S
9
G
4
Posts: 133
Reputation: 4,350

Post » Sat Jan 16, 2016 6:32 pm

I made a little example. Have a look:
https://drive.google.com/file/d/0B5FlDY ... sp=sharing
B
24
S
3
G
1
Posts: 451
Reputation: 2,165

Post » Sat Jan 16, 2016 6:41 pm

@Asmodean Awesome! I managed to get somewhat close by using "Pick nearest" and setting Y to 0, but it forced me to also set the X value which made things behave funky and was less than optimal. This implementation is way better and seems to work perfectly. Thanks a lot! :)
B
32
S
9
G
4
Posts: 133
Reputation: 4,350


Return to How do I....?

Who is online

Users browsing this forum: dop2000, jorgmaquoi, senecaa and 15 guests