How do I Use 'Pick Nearest' properly?

Get help using Construct 2

Post » Thu Jan 21, 2016 1:36 pm

I'm trying to understand picking instances with a simple project. I've searched for answers but I haven't found anything much to help un-confuse me, so I'm hoping someone can tell me what's going on.

Simply, I'm attempting to 'Pick Nearest', but it seems to always pick the first instance... And I think the first (original sprite) doesn't pick successfully at all.

The entire project:

I read that I need to 'Pick All' to refresh the selection, so that's there. I also read that you can't pick an object in the same event it's created, but I don't think that's the problem? I know I'm derp. If you have suggestions for me on anything, please halp! I find the way C2 does events confusing often.
Posts: 14
Reputation: 230

Post » Thu Jan 21, 2016 3:49 pm

This is much simpler with Families, but the problem is you can't reference two of the same object at the same time - how would C2 know which is which? You can cache the data needed, and then set it at the end.
Image ... ilies.capx
Posts: 3,582
Reputation: 115,008

Post » Thu Jan 21, 2016 4:59 pm

Ahh! That's really close to the other way I was attempting, but obviously I was getting something wrong there as well.

If I understand, checking 'UID !=' is what you mean by "can't reference two of the same object at the same time"? Because I had wondered about pick closest just picking itself and if it would.. So, I suppose my first Thingee instance is in fact doing that.

I'm also trying to deepen my understanding on instances. I've since learned that I can just destroy the original and do away with that doublespeak at the top. It can even be destroyed before creating new instances. (the mind boggles)

Sorry I couldn't just give the capx. Forum won't let me post links yet :)

Thank-you very, very much for the help!!
Posts: 14
Reputation: 230

Return to How do I....?

Who is online

Users browsing this forum: Ajbael, ismael123, lennaert, Yahoo [Bot] and 6 guests