Exclude specific solids from pathfinding

Get help using Construct 2

Post » Tue Feb 19, 2013 3:54 am

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!                                                      Sean Noonan2013-02-19 07:04:55
B
35
S
6
G
2
Posts: 121
Reputation: 3,585

Post » Tue Feb 19, 2013 10:42 am

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). Blinx1232013-02-19 10:43:00
B
6
S
2
Posts: 206
Reputation: 1,685


Return to How do I....?

Who is online

Users browsing this forum: dieblume86, Kagubro and 2 guests