Deleting a solid object at runtime does not affect pathfinding as i expected

0 favourites
  • 3 posts
From the Asset Store
Hand-painted tiles, objects, animated objects, and background to build a colorful Mayan civilization environment.
  • Hi everyone.

    I am new in construct 3 and i cannot figure how to acieve this.

    I have a tilemap object with solid behavior enabled. And i have created a level with a path like a labyrinth.

    I have another object with pathfinding behavior and it works good. It finds the path and walks as i expect.

    But... i also have a mouse click event on the tilemap object in order to delete the tile in the clicked area. The problem is although the tile is deleted the object with the pathfinding behavior seems to ignore that and continues to avoid the specific area as if the tile has not been deleted.

    Thanksin advance for your time

    John

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You'll have to regenerate the obstacle map. This is cost intensive and thus not done automatically.

    construct.net/en/make-games/manuals/construct-3/behavior-reference/pathfinding

    You have "Regenerate obstacle map" which is probably not needed for your case since it regenerates the entire map.

    So you probably wanna use "Regenerate region" and just select a region around the deleted tile.

  • You'll have to regenerate the obstacle map. This is cost intensive and thus not done automatically.

    https://www.construct.net/en/make-games/manuals/construct-3/behavior-reference/pathfinding

    You have "Regenerate obstacle map" which is probably not needed for your case since it regenerates the entire map.

    So you probably wanna use "Regenerate region" and just select a region around the deleted tile.

    Thank you very much. That's what i missed. I finally managed to make it work as i expect.

    Thanks again

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