How: Pathfind through solid

0 favourites
  • 4 posts
From the Asset Store
Units do not overlap each other and use different ways if there are several free ways.
  • Enemies find a way to player only when there is a hole in a solid. How do I have them pathfind through a destructible solid?

    Example: I have a house with door. I want enemies to find way to door and destroy it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • what you can do when the layout load, disable the solid behaviors of the objects enemies can go through, then regenerate the pathfinding obstacle map, and finally re-enable the solid behaviors. I have not tested it, so I can't guaranty what will happen when the enemy hit the doors, will they get blocked or go through? I'm not sure the collisions are tested during pathfinding moves.

    Edit: in fact you can disable the solid behavior from the beginning and only enable them when layout start, the obstacle map should already be generated, this will save you from having to regenerate it

  • Or you can find a pathto the door first, destroy it, then find the path to players?

  • I like that route of finding door first. How do I make it so that they walk around the building rather than going straight to door first? (sorry separate topic)

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