How do I add obstacle which is the same objec "pathfinding"

0 favourites
  • 2 posts
From the Asset Store
Obstacle Impacts and Cartoon voices, will makes your game more funny!
  • How do I add obstacle which is the same objec as "pathfinding" object?

    I have 2 the same objects "X" and I want them to avoid object "X".

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • NormalOne,

    First, I can't help but notice you asked the same question 2 times just 10 minutes apart. Try a little patience. Don't expect immediate answers. Sometimes it takes a little time before someone who knows how to help you sees your question.

    Second, as stated in the manual under the pathfinding entry:

    "The grid of obstacles is only determined once on startup. If objects are moved in the layout, the pathfinding grid is not updated, and objects will continue to pathfind as if the objects were in their old positions."

    https://www.scirra.com/manual/154/pathfinding

    In other words, the pathfinding behavior creates a map at the start of the program. This map is then used anytime the behavior is told to find a path.

    If you continue reading, it tells you how to update the grid manually but warns against it given the CPU load. If you are constantly trying to recalculate the map every time the object moves you are really going to slow down the system.

    "To update the entire obstacle grid use the Regenerate obstacle map action, but note this is a very CPU-intense operation and should only be done on one-off occasions. It is much more efficient to update only small parts of it (ideally only the area that has changed), which can be done with the Regenerate region and Regenerate region around object actions."

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