How do I reset the pathfinding?

0 favourites
  • 2 posts
From the Asset Store
Units do not overlap each other and use different ways if there are several free ways.
  • Hi guys,

    I'm working on a turret defense game. I want the player to be able to drag&drop the walls between the rounds.

    My problem is, that once a path is set, the enemys wont change it and walk though the walls I moved into their way and ignore the new and shorter path.

    I would be very thankful for any tipps or maybe even a small example.

    Thanks and so long

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi guys,

    I'm working on a turret defense game. I want the player to be able to drag&drop the walls between the rounds.

    My problem is, that once a path is set, the enemys wont change it and walk though the walls I moved into their way and ignore the new and shorter path.

    I would be very thankful for any tipps or maybe even a small example.

    Thanks and so long

    Quote from the Manual:

    [quote:nthe1neo]Regenerate obstacle map

    Determine whether each cell in the obstacles grid is an obstacle again. This is a very CPU intensive action and should not be used regularly. If only part of the obstacle map has changed, prefer to use one of the Regenerate region actions. Any changes made by using Add obstacle, Clear obstacles, Add path cost and Clear cost will take effect the next tick after this action. Note this means if you attempt to find a path immediately after this action, the obstacle map won't have been updated yet; add a 'Wait' action with a short delay to make sure the updated map is used in that case.

    Will this help?

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