[SOLVED] How do I 'Pick' nearest where inst. variable = x?

0 favourites
  • 4 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.
  • G'day again guys.

    I've looked and can't find. I want to 'pick nearest object' where that objects instance variable also = "idle".

    This is what I have at the moment and it does pick the nearest, but, as you can see if that nearest doesn't have instance variable 'Status' = "IDLE" then nothing happens.

    What I *want* to do: Pick that nearest instance, if the Status variable isn't "IDLE" pick the next nearest.


    Any ideas?

    Thanks in advance - Humpty

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Try picking status=idle and then pick nearest after that.

  • You're so awesome :* :* :* :*

    I thought about that, but in my head it didn't seem it would work. (I should have tried it instead of deciding it woudn't)

    THANKS :* :*


  • Some things are not entirely intuitive in C2.. I just think try and think through the picking/filtering. (Start with the largest group of instances you want to match, not the smallest). You can also have the above in one event, but that's just an optimization.

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