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
50
S
20
G
16
Posts: 167
Reputation: 11,972

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
26
S
3
G
1
Posts: 494
Reputation: 2,318

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
50
S
20
G
16
Posts: 167
Reputation: 11,972


Return to How do I....?

Who is online

Users browsing this forum: dioking, kelany and 4 guests