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
31
S
9
G
4
Posts: 131
Reputation: 4,321

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
23
S
3
G
1
Posts: 411
Reputation: 2,060

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
31
S
9
G
4
Posts: 131
Reputation: 4,321


Return to How do I....?

Who is online

Users browsing this forum: AekiroStudio, Aquanex2, Baidu [Spider], RageByte and 12 guests