stratospheres's Recent Forum Activity

  • Rhindon - interesting. I set my cell size to 0, but it's still broken. Still digging...

  • Rhindon - changed to custom obstacles, and the problem persists. I'm registering my 'Wall' sprite as an obstacle on start of layout, then adding a bunch of them dynamically, then doing the pathfinding, and it seems to still not work.

    More updates when I have some.

  • I'm trying to build a minimal repro... since it loads from a webserver that's currently on localhost, that means publishing the .json data files to a web server too... so it might take awhile.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Rhindon - No, I'm using "solids" as my obstacles. I'm looking at Custom Obstacles right now, trying to understand how they work. I built a minimal repro to see if I could post the capx, but it doesn't repro... doh. In that, I create a single wall, and then pathfind to it on mouse click, and it works as expected. That one uses "solids" for Obstacles as well.

    SmallChief - Thanks for the clarification. In my case, I'm definitely doing a new "find path" after the obstacle map is updated. In fact, I've written some debug code to simply path find to the mouse on double click, after the walls are dynamically created, and the behavior still persists - pathfinding ignores the walls, and walks right through them.

  • I'm not updating after each wall is created, i'm actually waiting until the whole set of walls is created _before_ i even do the pathfinding (5 seconds after the walls are created, roughly).

    I'll keep debugging and see what I can find.

    -adam

  • I'm seeing the following behavior, which seems odd, and wanted to confirm that others see this too.

    I'm trying to setup a 2d X by Y grid dynamically, and then use pathfinding to move through it. In order to set up the grid, I'm reading JSON from a web server, loading it into a 2D array, and then using that array to layout a series of square sprites ('Wall'), which have a 'solid' behavior, as the walls of my maze. I've gotten the layout working fine, but the problem comes in when I then try to have a different sprite use pathfinding to find it's way through my layout.

    5 seconds after my layout loads (which should be well after the layout is done), I try to use pathfinding on another sprite ('BadGuy') to figure out a path to yet another sprite ('Target'). The Pathfinding Complete event fires, but BadGuy.MoveAlongPath simply results in the BadGuy walking through walls, and heading straight to my target.

    If instead, I simply duplicate my Wall sprite a bunch of times, and hand layout my maze, pathfinding works as expected, and BadGuy weaves down my hallways, and not through the walls.

    This seems to be related to Pathfinding not respecting sprites created dynamically, even if they have the Solid behavior.

    Is this expected? If so, is there a way around this?

    Thanks!

stratospheres's avatar

stratospheres

Member since 29 Oct, 2012

None one is following stratospheres yet!

Trophy Case

  • 12-Year Club
  • Email Verified

Progress

13/44
How to earn trophies