How: Pathfind through solid

Get help using Construct 2

Post » Mon Sep 23, 2013 5:24 am

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.
B
60
S
19
G
3
Posts: 451
Reputation: 6,364

Post » Mon Sep 23, 2013 7:21 am

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 itOlivierC2013-09-23 08:30:22
B
12
S
5
G
2
Posts: 132
Reputation: 2,637

Post » Mon Sep 23, 2013 8:32 am

Or you can find a pathto the door first, destroy it, then find the path to players?
B
18
S
4
G
1
Posts: 332
Reputation: 3,149

Post » Tue Sep 24, 2013 5:19 am

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)
B
60
S
19
G
3
Posts: 451
Reputation: 6,364


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 6 guests