Exclude specific solids from pathfinding

  • I have a scenario where a solid is pathfinding between two points, however I want to ignore another solid that is near the ideal path between the two points, so that the solid doesn't attempt to avoid it.

    Here's the scenario:

    A guard is walking from point to point, but there is an explosive barrel alongside his path.

    Obviously I don't want him to path around it whilst he is patrolling (as I want to be able to shoot it and kill him). However I need the barrel to be solid so that nobody can walk through it.

    Any ideas?

    (Thanks in advance)!

    I've been using Construct 2 about a week now, so I'm new to pathfinding, etc. I'm also a first time poster here!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • AFAIK, the only way to achieve this is by using the custom pathfinding behaviour (thus abandoning solid entities in favour of explicitly defined obstacles).

    That way, you can also clear the obstacle map in case of a specifically scripted event (quite handy if you have cutscenes defying the laws of physics or simply want your guard run past all obstacles, looking for a spot to hide, in case the player missed the shot).

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