Pathfinder regenerate obstaclemap broken

0 favourites
  • 3 posts
From the Asset Store
A short demo of template sold on store, with formations on end of way for no overlaps.
  • Pathfinder regenerate obstaclemap issue

    At first the pathfinder works, but when i change to a different level with different walls, the system wont regenerate obstacles map. It worked on previous versions of construct2

    Attach a Capx

    http://www.se32.com/html5games/td/bug.capx

    Description of Capx

    Isolated code of monsters path of my game.

    Steps to Reproduce Bug

    • Start on level 1, press M to see the collisions.
    • Then press 2 to change to level 2 and you will see the mobs wont follow the right path and will still follow the previous layout collision

    Observed Result

    Collisions are fine, but objects wont regenerate the path

    Expected Result

    It should regenerate the path

    Affected Browsers

    • Chrome: (YES)
    • FireFox: (YES)
    • Internet Explorer: (YES)

    Operating System and Service Pack

    Windows 10

    Construct 2 Version ID

    212.2

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Closing as not a bug. From the manual with emphasis added:

    [quote:32mtn3ft]Regenerate obstacle map

    Determine whether each cell in the obstacles grid is an obstacle again. This is a very CPU intensive action and should not be used regularly. If only part of the obstacle map has changed, prefer to use one of the Regenerate region actions. Any changes made by using Add obstacle, Clear obstacles, Add path cost and Clear cost will take effect the next tick after this action. Note this means if you attempt to find a path immediately after this action, the obstacle map won't have been updated yet; add a 'Wait' action with a short delay to make sure the updated map is used in that case.

    Your project regenerates the obstacle map and finds a path in the same event without waiting for the update.

    The Pathfinding behavior has worked like this as long as I can remember and we haven't changed the behavior at all for some time now, I doubt it used to work.

  • Issue is, if i copy the object with the behaviour between scenes, it works. Its a matter of that. Even if i create the object on the fly, i gotta have it hidden in the scene to make it work changing scenes.

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