need help on multiple path finding instances

0 favourites
  • 7 posts
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • i have a object with pathfinding behavior. this object has several instances in layout and all of them has to find same path but i don't want them to overlap themself.

    how can i do this?

    Tagged:

  • There's several ways.

    All of them are complicated.

    Timer works nice.

    For each,start Timer with Loopindex*multiplier On Timer find path

  • i didn't understand this

    how this will avoid overlapping with same instances.

    i didn't get what to do on "multiplier On Timer find path"

  • The timer would be increased by the loopindex seconds

    (Loopindex=0) x 1 = 0

    (Loopindex=1) x 1 = 1

    (Loopindex=2) x 1 = 2

    It's not feasible to check for overlapping.

    You can keep them from doing that by starting them at different times.

  • Do you mean you don't want your objects to overlap each other while they're moving along the path?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Do you mean you don't want your objects to overlap each other while they're moving along the path?

    Fib yes, I don't want them to overlap with each other.

    is there any way so each of them find a different path to reach the destination.

  • You can try this:

    Make both moving objects solids (disabled) and give them custom movement.

    Check each tic if they overlap and are both moving along the path.

    if so enable one to solid.

    use custom movement push out solid.

    set them both back to disable solid.

    This will make them not overlap but one of them will have to wait while the other moves along the path if you want to get tricky you can give one of them priority and use push out solid on the other non priority one.

    I hope this is useful.

    yours

    winkr7

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