Can't make each instance of pathfinding object find path to a random instance of destinations

0 favourites
  • 3 posts
From the Asset Store
Hand-painted tiles, objects, animated objects, and background to build a colorful Mayan civilization environment.
  • I tried using

    on start of layout

    for each pathfindingobject

    pick a random instance of destination --> find path to destination.X, destination.Y

    on path found --> move along path

    but for some reason only one of them moves.

    also i want to make them pathfind to a different instance once they reach their destination but it doesn't work

    pathfindingobject is overlapping destination --> find path to random instance again

    for information, pathfinding object is a sprite and destination is a tiled background.

  • update: i used trigger once instead of on start of layout but now two of them move out of 6.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Based on what I'm reading it's not bad and should work especially on start of layout. Instead of using overlapping destination for now try 'on arrived' and see if that works for the new destination.

    For the ones not moving check their status if they found a path, or simple things like they do have speed set to move and pathfinding enabled.

    You could send a screenshot for us to see the events more clearly, thanks.

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