Enemy Pathfinding Issue

Get help using Construct 2

Post » Mon Jan 27, 2014 6:57 am

The enemies that spawn on the map have a Pathfinding behavior on them. They seem to be going around objects just fine as they walk towards me - except when I place blocks between me and them, they don't walk around it, but walk into it. How do I make it so that they walk around every solid object?


Every 0.5 seconds:
enemy > Find path to (Player.X,Player.Y)
enemy > Move along path
B
58
S
19
G
3
Posts: 446
Reputation: 6,302

Post » Mon Jan 27, 2014 7:01 am

You have to make them update their path. I think it's called recalculate or something like that.
Put that action for every time you place a block.
B
10
S
3
G
3
Posts: 234
Reputation: 3,467

Post » Mon Jan 27, 2014 7:02 am

When the layout changes, you will have to recalculate the path and/or add obstacles.

In the manual this is described pretty well.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Mon Jan 27, 2014 7:03 am

But isn't the "Find path" restarting every 0.5 seconds? I figured it would do the same thing. I'll look for the recalculate thing.
B
58
S
19
G
3
Posts: 446
Reputation: 6,302

Post » Mon Jan 27, 2014 7:04 am

"Regenerate obstacle map" worked. Thanks!
B
58
S
19
G
3
Posts: 446
Reputation: 6,302


Return to How do I....?

Who is online

Users browsing this forum: AnD4D and 21 guests