How do I move a npc to the nearest object

Get help using Construct 2

Post » Sat May 28, 2016 2:36 am

I basically want a npc to move to a nearby town and capture it using the pathfinding behavior. The issue I am having is how can I tell this npc where the nearest is town is that is eligible for capture. When I use the find path command I can only input x and y coordinates for a single town but I would like to have a map where there is multiple towns. Any suggestions on how I can make this happen?
B
15
S
4
Posts: 31
Reputation: 1,267

Post » Sat May 28, 2016 6:53 am

Look in the samples that come with C2 and use "pick closest" example combined with pathfinding
Image
B
75
S
23
G
3
Posts: 673
Reputation: 9,273

Post » Sat May 28, 2016 1:50 pm

Which sample is this referenced in?
B
15
S
4
Posts: 31
Reputation: 1,267

Post » Sat May 28, 2016 4:50 pm

Pick Nearest. Use the search feature in the upper right hand corner of the dialog box
Image
B
75
S
23
G
3
Posts: 673
Reputation: 9,273


Return to How do I....?

Who is online

Users browsing this forum: R0J0hound and 7 guests