Pathfinding error??

1 favourites
  • 6 posts
From the Asset Store
Units do not overlap each other and use different ways if there are several free ways.
  • Hey guys, so in this game, a dungeon randomly spawns itself and along with that are enemies, which are randomly placed along the map. The orange square enemies have a pathfinding behavior, and they work perfectly fine on the first start of layout, but once the layout is restarted, they begin going through walls and doing strange things. If anyone knows what to do, i'd really appreciate the help

    Game zip


  • NOTE: WASD for the player, restart the layout by letting the enemies defeat you. please allow 10-15 seconds at the start so the map can generate itself, then the game should be ready to go

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Why did you share an exported project? What are we supposed to do with it?

    Please post your c3p file or a screenshot of the code.

    Are you regenerating the obstacles map for pathfinding, after level generation is finished?

    Also, how big is your map if it takes 15 seconds to build it?!

  • oh, my bad. here's the c3p haha

    I made it so that the enemies regenerate the obstacle map once it's done, but it doesn't seem to do anything after the layout is restarted.

    Also, an explanation for the amount of time the map takes to spawn is because of the different method I used, I made it so that it starts with one ground tile, and that tile decides to spawn another tile on any of its 4 sides, and it's limited to around 1000 tiles. The tiles are fairly small

    The code is pretty disorganized at the moment, but that's because this project is pretty new and mainly a proof of concept. Thanks!

  • There is some error in browser Console log, it happens after the layout is restarted, but before enemies are created:

    Not sure what's causing it, but I think it breaks the pathfinding. Try disabling/rearranging some events, see if you can fix it. Also, if you can reproduce this issue in a small demo project, I advise you to submit a bug report here:

  • Thanks for the help

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