Help? (pathfinding)

Get help using Construct 2

Post » Mon Aug 19, 2013 3:25 am

On created the enemy should go to a location. If it collides with a player, it should stalk the player until it loses sight of the player. If it loses sight it should go back to the location.

https://www.dropbox.com/s/wyagowno5fn3pit/Alpha.capx
B
12
S
4
G
1
Posts: 100
Reputation: 2,362

Post » Mon Aug 19, 2013 4:18 am

If you disable the enemies Solid behaviour it moves. This may be a bug - I'm not sure. I could see this being an issue if you had Obstacles set to Solid, but you don't. You're using Custom.
ImageImageImage
B
71
S
22
G
241
Posts: 3,734
Reputation: 134,494

Post » Mon Aug 19, 2013 4:24 am

Thanks, but the enemy still doesn't go to its location.
B
12
S
4
G
1
Posts: 100
Reputation: 2,362

Post » Mon Aug 19, 2013 4:33 am

You're not resetting LocationGo=0.
ImageImageImage
B
71
S
22
G
241
Posts: 3,734
Reputation: 134,494

Post » Mon Aug 19, 2013 4:42 am



Still doesn't work.
B
12
S
4
G
1
Posts: 100
Reputation: 2,362

Post » Mon Aug 19, 2013 4:42 am

https://www.dropbox.com/s/1idcc2unk1je0xf/Capture.PNG
B
12
S
4
G
1
Posts: 100
Reputation: 2,362

Post » Mon Aug 19, 2013 4:51 am

Alpha_BHT.capx

You do have to get 500 pixels away!
ImageImageImage
B
71
S
22
G
241
Posts: 3,734
Reputation: 134,494

Post » Mon Aug 19, 2013 5:06 am

You have to be kidding me! I move the player far away from the enemy sprite and it didn't work, but now it works.

I have bad luck lol

Thanks for your help.
B
12
S
4
G
1
Posts: 100
Reputation: 2,362


Return to How do I....?

Who is online

Users browsing this forum: Anna Nehves Br, divsyntax, oosyrag, volumetv and 16 guests