Why pathfinder isn't working?

Get help using Construct 2

Post » Mon Mar 23, 2015 5:06 pm

Image

So, I tried to make him follow player by myself and then watched many videos. The problem is I made everything just like in tutorials and still can't make him follow the player. What's the problem?
B
6
Posts: 20
Reputation: 266

Post » Mon Mar 23, 2015 5:09 pm

The object is continually looking for a new path ..... not getting a chance to actually find it.

Remove the every 0.5 and the repeat amount of times .... and make that a trigger once.

Then add

"on pathfinding arrived"
find path to player.X, player.Y
Who dares wins
B
56
S
16
G
21
Posts: 1,875
Reputation: 19,406

Post » Mon Mar 23, 2015 5:23 pm

lennaert wrote:The object is continually looking for a new path ..... not getting a chance to actually find it.

Remove the every 0.5 and the repeat amount of times .... and make that a trigger once.

Then add

"on pathfinding arrived"
find path to player.X, player.Y


Image
Image
Image

Nope, still stands
B
6
Posts: 20
Reputation: 266

Post » Mon Mar 23, 2015 5:44 pm

Most likely because it cant find a path, try to add a "Fail to find path" and see if that triggers.
B
44
S
11
G
2
Posts: 1,181
Reputation: 6,816

Post » Mon Mar 23, 2015 6:26 pm

Did you perchance disabled the pathfinding in the properties ?
Who dares wins
B
56
S
16
G
21
Posts: 1,875
Reputation: 19,406

Post » Tue Mar 24, 2015 12:01 pm

lennaert wrote:Did you perchance disabled the pathfinding in the properties ?


Nope, it's enabled
B
6
Posts: 20
Reputation: 266

Post » Tue Mar 24, 2015 12:04 pm

Only a couple things that really can get in the way of it not finding a path.

Too many solid objects, not making room for a path

Too big cell size, so the cells can not determine a path ...
Who dares wins
B
56
S
16
G
21
Posts: 1,875
Reputation: 19,406

Post » Tue Mar 24, 2015 12:05 pm

lennaert wrote:Did you perchance disabled the pathfinding in the properties ?
Here's my .capx, can you take a closer look? My game today went crazy, I didn't do anything. Gameover starts playing in the start of layout, I can't understand why. Yesterday everyting worked fine. And yeah, maybe you'll help me how to make tank shoot single shots? Because it's shoots as many times as you press.

https:// drive.google.com /file/d/0B3Iu4HpEXzMaYTNfeGs2X2RpSGM/view?usp=sharing
B
6
Posts: 20
Reputation: 266

Post » Tue Mar 24, 2015 4:02 pm

nimos100 wrote:Most likely because it cant find a path, try to add a "Fail to find path" and see if that triggers.


Yeah, it is! How to fix it?
B
6
Posts: 20
Reputation: 266

Post » Tue Mar 24, 2015 4:46 pm

Your captain have the solid behavior, so it get stucked on it self, you have to remove that behaviour then it works. Also i would highly recommend that you organize your events, its pretty messy and will cause you problems later on with 100% certainty :)
B
44
S
11
G
2
Posts: 1,181
Reputation: 6,816

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 9 guests