How do check object distance in ascending order?

0 favourites
  • 2 posts
From the Asset Store
A real time multiplayer racing game template for your projects
  • so. i have bloicks, when clicked they are toggeled on to dig.

    the player moves to it and digs it.

    if you unselect it, it chooses another nearest to instance.

    problem is, its picking blocks through other blocks. it mines based on the blocks uid. so its not an overlapping problem.

    i could do check distance on arrived. but it would just check for the same block as nearest again after.

    i was thinking on having it check many blocks at once. if it cant reach on arrived choose next one on list.

    so how do i check multiple objects in ascending order?

    other solutions are super welcomed!

    ill upload this for others to see soon. ideally i wanted to finish the checks and a selector box first

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • There is "For each ordered" System loop:

    For Each Block order by distance(fromX, fromY, Block.X, Block.y)

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