Path finding plus new solids

0 favourites
  • 2 posts
From the Asset Store
Kids Game
$49 USD
New Sounds Added Update: 115 new sound effects added for no additional cost!
  • I read that adding new obstacles after a layout loads requires recalcing the obstacle map. I thought this meant that paths would just be calced incorrectly until the map gets regenerated.

    Is it also true that when adding new obstacles that are solids and telling a sprite to follow a path using the old obstacle map that the sprites just ignore the new solids and walk right through them?

    I was trying to have my map get calced with its obstacles at startup and then adding destructible walls on a timer (once) after the layout loads so that once those destructible walls are destroyed the enemies could walk through the space they once occupied... but the enemies pretend they are not there at all and just walk through them before they are destroyed.

    It is as if the solid behavior has no real effect on sprites that are "following a path".

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You should rebuild and recalculate a path.

    Once the path is calculated it is built into the pathfinder node list. Adding objects won't auto recalculate anything. So it will move through the solids.

    You will probably need to tweak things a little to get them to work right. As a suggestion. Reubuild the path map(not the path) the tick after all the objects are built.

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