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:
Image

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.
B
4
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

http://www.blackhornettechnologies.com/ ... ilies.capx
ImageImageImage
B
71
S
22
G
259
Posts: 3,794
Reputation: 143,704

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!!
B
4
Posts: 14
Reputation: 230


Return to How do I....?

Who is online

Users browsing this forum: Ryan Kocourek and 24 guests