How do I make an object move to the nearest object?

Get help using Construct 2

Post » Sat Jun 27, 2015 2:55 am

Hello,

I'm having trouble making a object move to the nearest object2. I want sprite to pick the nearest sprite2 and move to that location. Each sprite object should move to the nearest sprite2 object, but for some reason both move to the same sprite2 object and it's not even the nearest one. I need some help guys, by the way I'm using @rexrainbow behavior called moveto.

Here is a demo and the code:
https://dl.dropboxusercontent.com/u/114 ... index.html

Thanks in advance
B
10
S
3
G
1
Posts: 26
Reputation: 1,263

Post » Sat Jun 27, 2015 3:31 am

Image
Image
B
64
S
23
G
7
Posts: 1,481
Reputation: 10,823

Post » Sat Jun 27, 2015 3:40 am

@korbaach It works perfectly! thank you so much!
B
10
S
3
G
1
Posts: 26
Reputation: 1,263


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 13 guests