If 2 or more instances has Pathfinding, they don't have individual collision targets

0 favourites
  • 2 posts
From the Asset Store
Units do not overlap each other and use different ways if there are several free ways.
  • Attach a project demonstrating the problem:


    The attachment capx is basically the original pathfinding example with a second instance of 'Sprite' which has the pathfinding behavior. first one is set to collision 'Solid' and the second one to 'Custom', nothing new changed in event sheet.

    Please note: this also occurs on C3.

    The steps to follow to reproduce the problem in the project:

    Just run the game and notice that both the first instance which has solid collision and the second which has custom collision, both follows the same path.

    What you expected to happen:

    the first instance of sprite should follow his path with solid as obstacle, so, it should avoid the solids, the second instance of sprite set as custom on obstacle should just ignore the solids and go straigth to the end of the path, this is because, it has nothing set as obstacle on eventsheet.

    What you observed happening instead:

    both the sprite instances follow the same path of the first instance, if the second, or any other instance has a different option of collision, it will be ignored, they follow only the option set on the first instance, but other properties options of pathinding like speed, acceleration, etc, they each work in an independent way, if first is set to speed, acceleration and desaceleration to 2000 and the second set to 200, the first one will be faster, like it's supposed to be, but the collision properties doesn't work as an independent property.

    Even if you try and use 'Clone object type' on the first instance of sprite, copy the same events and replace the object to the new sprite but instead of solid you set to 'custom' obstacle, it still gonna use 'solid' as an obstacle because of the first sprite.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Seems as designed because I think it uses the one obstacle map for the behaviour. You can add another pathfinding behaviour if you want to do something different.

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