Pathfinding error??

1 favourites
  • 6 posts
From the Asset Store
7 Errors
$12.75 USD
15% off
7 Errors is a game where you have to find the 7 mistakes before time runs out. Can you find all 7? Have fun looking.
  • 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

    drive.google.com/file/d/1KefHLhS67w1J34s_uWu4LcBVks8FkrCB/view

    Game zip

    Tagged:

  • 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

  • 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 drive.google.com/file/d/1pTr6X8-fkaIlh6RmhHnIcHvPhLnsin_1/view

    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!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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:

    github.com/Scirra/Construct-3-bugs/issues

  • Thanks for the help

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