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
Check out my games on Google Play:

BEAST ATTACK (960,000+ downloads!)

ZOMBIE BASH (Android) (Launched Feb 17)

ZOMBIE BASH (iOS) (Launched March 17)
B
50
S
15
G
2
Posts: 427
Reputation: 5,164

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.
Check out my games on Google Play:

BEAST ATTACK (960,000+ downloads!)

ZOMBIE BASH (Android) (Launched Feb 17)

ZOMBIE BASH (iOS) (Launched March 17)
B
50
S
15
G
2
Posts: 427
Reputation: 5,164

Post » Mon Jan 27, 2014 7:04 am

"Regenerate obstacle map" worked. Thanks!
Check out my games on Google Play:

BEAST ATTACK (960,000+ downloads!)

ZOMBIE BASH (Android) (Launched Feb 17)

ZOMBIE BASH (iOS) (Launched March 17)
B
50
S
15
G
2
Posts: 427
Reputation: 5,164


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 13 guests