pathfinding AND solid assigned to sprite doesn't w

Get help using Construct 2

Post » Thu May 23, 2013 7:36 pm

I'm currently using pathfinding on both my hero (user controlled) and an npc. I've also added solid behaviors to both - but it seems that pathfinding will pass right through any object with pathfinding assigned to it, regardless if it also has solid behavior or not.

is this expected?

If a capx is required, i'll add one a little later - but is easy to check - add a sprite, add pathfinding behavior, add solid behavior. do this a second time with an NPC. first sprite will walk right through the other.
B
8
S
2
Posts: 12
Reputation: 1,159

Post » Thu May 23, 2013 7:54 pm

As long as I can remember, yes, this is expected.

But you can still mark some objects as "obstacle", so they will be treated as solids by pathfinder object.
B
10
S
2
G
3
Posts: 36
Reputation: 3,315

Post » Thu May 23, 2013 8:59 pm

Ah, ok. Thank you Gamer. For anyone stumbling on my question in relation to their own - I'm realizing now that using pathfinding on NPC's is inefficient, so probably shouldn't do this. My fix is to use pathfinding on my player only, and I'll have to find some way to pre-set the npc's walking pattern. I'm sure the FAQ will have some info on what to do next for me... moveTo possibly.

Thank you again Gamer - your solution helped me realize the error of my ways :P
B
8
S
2
Posts: 12
Reputation: 1,159


Return to How do I....?

Who is online

Users browsing this forum: Artpunk, DemantDigitalArt, Magistross and 29 guests