Pathfinding doesn't work

Get help using Construct 2

Post » Tue Jul 30, 2013 11:24 am

I have a tower defence game, where there are 2 levels.
Each level is a layout and an event sheet.
The monsters follow the road with pathfinding behavior and solid objects around the road.
If I launch any of these 2 levels directly from Construct 2, the creeps go the road nicely.
But if I complete level 1 and go to level 2 - the creeps ignore solid objects and just go straight ahead.
What am I doing wrong? =(
B
1
Posts: 2
Reputation: 129

Post » Tue Jul 30, 2013 11:52 am

Could you post the capx? It's probably something in the events.
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 » Tue Jul 30, 2013 3:34 pm

maybe a capx is needed, but from the top of my head:

every obstacle you want needs to A) have the solid behavior, or B) be manually added to the custom obstacles for the object with path finding. (in any case select the proper obstacle type in the behavior properties)

Also, obstacles are not updated unless you "regenerate obstacle map".

To avoid over saturation, I recommend regenerating the obstacle map only when needed. Like in the same event that finds the path, though you need to make sure the "regenerate obstacle map" action is above the "find path" action.

Hopefully is a simple problem like this ^^
B
43
S
12
G
6
Posts: 446
Reputation: 6,797

Post » Tue Jul 30, 2013 4:57 pm

This video helped me as far as making a check list...
http://www.youtube.com/watch?v=jm7vfQ60OUc
B
15
S
5
G
2
Posts: 164
Reputation: 3,082

Post » Mon Aug 05, 2013 6:03 am

Thanks for the replies.
The point is - when you make several (2, for example) layouts with pathfinding behaviors, they stop working correctly after you pass between them.
I solved the problem with removing of pathfinding and adding a move-to-target and a function to control it. Hepitoe2013-08-05 06:03:57
B
1
Posts: 2
Reputation: 129


Return to How do I....?

Who is online

Users browsing this forum: BrokenHuman50, Hiddendanger and 10 guests