Pathfinding not working?

Get help using Construct 2

Post » Sun Jan 05, 2014 11:10 am

Hi guys,

First time using the pathfinding function and it doesn't want to work? Can you please take a look and let me know where I went wrong?

Thanks
Maggs

https://www.dropbox.com/s/3llquv70rzopxsm/pathfinding.capx
B
5
S
1
Posts: 44
Reputation: 465

Post » Sun Jan 05, 2014 12:00 pm

It's trying to find a new path every tick. Trigger the find path on start of layout and you'll see them move. You need to find a better way of triggering the find path such as when the enemy is spawned or similar..
B
45
S
15
G
73
Posts: 2,019
Reputation: 43,420

Post » Mon Jan 06, 2014 11:13 am

Thanks Plinkie, that worked great! Any ideas how to stop the enemy from simply going off the screen to avoid the obstacles?

Thanks!
B
5
S
1
Posts: 44
Reputation: 465

Post » Mon Jan 06, 2014 12:02 pm

[QUOTE=Magnatolia] Thanks Plinkie, that worked great! Any ideas how to stop the enemy from simply going off the screen to avoid the obstacles?

Thanks![/QUOTE]

try to add obstacle in the edge of screen.

B
12
S
2
G
1
Posts: 25
Reputation: 986

Post » Mon Jan 06, 2014 12:31 pm

Hey Farieh, that would work, but I want to bound them to the layout without having to put an edge around the screen. I set the enemy sprite to have the bound to layout behaviour but that doesn't seem to work.

Although on my layout screen the viewable area has a dashed line with more white space beyond that. Not sure if that's correct?

Thanks!
B
5
S
1
Posts: 44
Reputation: 465


Return to How do I....?

Who is online

Users browsing this forum: Alvaro2, Hadyurik, Yahoo [Bot] and 8 guests