Enemy pathfinding help

Get help using Construct 2

Post » Mon Sep 04, 2017 8:00 am

Not quite sure why this is a thing, but it is. For one of the tutorial stages of this shooter game I'm making, there are two enemies encased in breakable rocks. Upon breaking the rocks, the enemies should be set loose, and begin to chase the player. However, they don't. I had a theory, and so I gave it a test. I was correct. For whatever reason, even though the rock isn't there anymore, the spot where the rock used to be is blocking the enemies line of sight to the player. There is no object to block it, it's as if the rocks ghost is magically blocking the path. Any ideas for why this is happening?
Oh, okay.
B
23
S
6
Posts: 41
Reputation: 1,405

Post » Mon Sep 04, 2017 9:42 pm

There is an obstacle map, which all pathfinding objects can see. If you destroy an object, it does not change the path in their eyes, they can still see the object there. You need to regenerate the obstacle map whenever you change something, it's one of the pathfinding actions.
B
52
S
21
G
93
Posts: 2,420
Reputation: 55,028

Post » Tue Sep 05, 2017 6:13 pm

plinkie wrote:There is an obstacle map, which all pathfinding objects can see. If you destroy an object, it does not change the path in their eyes, they can still see the object there. You need to regenerate the obstacle map whenever you change something, it's one of the pathfinding actions.


Yeah, I ended up figuring that out on my own. Thanks anyways.
Oh, okay.
B
23
S
6
Posts: 41
Reputation: 1,405


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 4 guests