Pathfind behavious uses previous layout's size as a limit

0 favourites
  • 11 posts
From the Asset Store
220 Food Sprites in 16x16 pixel size. Perfect for items for a retro style game.
  • Problem Description

    If I load a new layout that is larger than the previous one, then order a sprite to follow a path, it moves only as far as the previous layout's size, and considers it 'reached'

    Attach a Capx

    dl.dropboxusercontent.com/u/205 ... ngBug.capx

    Description of Capx

    Layout 1 just loads Layout 2 on any key press

    Layout 2 starts with Sprite moving across screen to reach Sprite 2 with Pathfinding behaviour

    TiledBackground is there to show Layout 1's size

    Steps to Reproduce Bug

    • Make two layouts, the first smaller than the second
    • Place an object on Layout 2 and tell it to move to somewhere beyond Layout 1's size
    • Start from Layout 2 and see the result
    • Start from Layout 1 and see the result

    Observed Result

    If I run Layout 2 alone, it works perfectly

    If I run Layout 1 first, Sprite seems to ignore that Layout 2's size is larger and still uses Layout 1's size as a limit to its path

    Expected Result

    Sprite 2 should move along the whole of Layout 2's size

    Affected Browsers

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

    Operating System and Service Pack

    Windows 7

    Construct 2 Version ID

    Release 22 (64-bits), Steam

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • .capx link is invalid, closing.

  • Really?

    "Message: jmberaldo can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?"

    Which means it's the forum's fault... The bug still exists and I did follow the template

    Trying again...

    dl.dropboxusercontent.com/u/20500516/PathfindingBug.capx

  • Reopened, link works. If you read our bug report guidelines, they cover why the link is changed and how to get around it.

  • Regenerate obstacle map.

  • I've encoutered the same problem.

    I'm working on a game where characters move between points in a scene using the pathfinding behavior.

    They are also global objects, moving from scene to scene (from a layout to another).

    But if they move from a layout to a bigger one, the bug jmberaldo mentionned happens. At some point, my characters stop at the limit of the previous layout. Or, if they were placed outside the boundaries of the previous layout, they don't move at all.

    Updated example is the capx.

    h*t*t*p*s://drive.google.com/file/d/0B6Z98-dLzRUmdVFtcmlxd29UZ1U/view?usp=sharing

    EDIT : (I've checked if obstacles were properly regenerated. They are.So the problem lies with construct not taking account of the new dimension of the layout)

  • Lasmelan, yes, that works, but that's a workaround. The expected system behavior is not taking previous layouts in consideration, or else, or I'll need to use regenerate obstacle map for every object on every layout (which the game itself warns is a costly action).

  • jmberaldo In my Tower Defense game every time a tower is built or sold, I regenerate every enemy's path obstacle map around that tower (well, that's inevitable). No lags yet.

  • In this case, if the obstacle is placed in the new layout outside the boundaries of the previous one (see my previous updated capx), the regenerate map option does not work. Obstacles are updated, but not the layout size, wich prevent the sprite to find his way, because construct does not calculate path outside of canvas.

  • Any news on this one? I'm trying to have a vertical slice of my game for a festival in April, but with this bug my version just won't work :'(

  • Thanks for the report, it should be fixed in the next beta.

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