How do I Use 'Pick Nearest' properly?

0 favourites
  • 3 posts
From the Asset Store
Pick Up Items Sound effects for your game, Take them for a ride right now and you will worry no more.
  • 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.

  • 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.

    http://www.blackhornettechnologies.com/ ... ilies.capx

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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!!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)