The Daily Click ::. Forums ::. Klik Coding Help ::. Shortest distance?
 

Post Reply  Post Oekaki 
 

Posted By Message

W3R3W00F

Drum and Bass Fueled Psycho

Registered
  08/11/2008
Points
  370

VIP MemberCardboard BoxThe Cake is a Lie
2nd August, 2010 at 00:08:18 -

Hiya, folks. I've got a little problem.

I want to check the shortest distance from one object to another. Here's my method:

Let's say I have 1 instance of "Active 1", 3 instances of "Active 2", and the Advanced Direction Object. I start with this:

•Start of Frame
-Set Alterable Value A("Active 2") to Distance(("Advanced Direction Object"), X("Active 2"), Y("Active 2"), X("Active 1"), Y("Active 1"))

Basically that sets all instances of Active 2's Alterable Value A to the distance between it and Active 1.

Here's the thing- I'm not sure how to check which instance of Active 2 has the lowest Alterable Value A. My current method is probably the wrong way to approach this, so if there's a better method, feel free to post it.

Any help is appreciated, and thank you in advance!

 
n/a

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1970

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
2nd August, 2010 at 01:34:33 -

"Select Object" extension

 
n/a

W3R3W00F

Drum and Bass Fueled Psycho

Registered
  08/11/2008
Points
  370

VIP MemberCardboard BoxThe Cake is a Lie
2nd August, 2010 at 03:56:05 -

Oh yeah, I forgot about that extension! Thanks, Sketchy!

 
n/a

nim



Registered
  17/05/2002
Points
  7233
2nd August, 2010 at 17:00:21 -

There's an extension that does this?! Ouch. I hate reading threads like this :/

 
//
   

Post Reply



 



Advertisement

Worth A Click