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
38
S
12
G
5
Posts: 151
Reputation: 5,338

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: 454
Reputation: 2,171

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
38
S
12
G
5
Posts: 151
Reputation: 5,338


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 22 guests