How do I make pathfinding on solid things.

Get help using Construct 2

Post » Sat Mar 26, 2016 9:15 am

Hi,
I want to make pathfinding of electricity, so I need to navigate them through the cables. Any way to make reverse pathing of some sort?
B
3
Posts: 8
Reputation: 187

Post » Sat Mar 26, 2016 12:23 pm

No, try when they need to do their pathfinding, set solid disabled
B
25
S
6
G
4
Posts: 173
Reputation: 3,933

Post » Sat Mar 26, 2016 3:04 pm

checkmate1 wrote:Hi,
I want to make pathfinding of electricity, so I need to navigate them through the cables. Any way to make reverse pathing of some sort?


Change "Obstacles" from "Solid" to "Custom" on the sprite with the path finding behavior.

I'm not sure if you can reverse it so much easily but this won't automatically use objects with solid behaviors as obstacles, and it can pass through solids. You will then have to set obstacles with your events.

You could try pinning invisible objects on all four sides of your solid sprites and setting those objects as obstacles. You would then have to remove the instances covering the ends somehow when connection is made.
ImageImageImage
B
40
S
23
G
11
Posts: 498
Reputation: 10,062

Post » Sat Mar 26, 2016 3:32 pm

Something like this?

https://www.dropbox.com/s/5ab6hyjlvmgaj ... .capx?dl=0

Of course just set the yellow sprites to invisible for the final version. Also, this doesn't recover the path when after disconnected, so probably don't want to destroy those sprites but move them and move them back when disconnecting.
ImageImageImage
B
40
S
23
G
11
Posts: 498
Reputation: 10,062


Return to How do I....?

Who is online

Users browsing this forum: David181, Norafaithrainbow and 31 guests