The Daily Click ::. Forums ::. Klik Coding Help ::. Getting the closext object, how?
 

Post Reply  Post Oekaki 
 

Posted By Message

Diefox

Possibly Insane

Registered
  23/02/2003
Points
  3481

VIP MemberGOTM -SEPTEMBER 2009 - 2nd place!GOTW WINNER APRIL 2010!
19th March, 2006 at 17:00:16 -

how do I do Object A go to the closest Object B in a frame full of objects B?
know that Object A is on the right side of the frame and all of the Objects B are on the left side.

i was trying to set one of Objects B value to "Xposition of object B" - "Xposition of object A" but i dont know how to make MMF select one of these Objects B bye the greatest or lower number.

thnaks in advance.

 
__________
amandapps.com

axel

Crazy?

Registered
  05/02/2005
Points
  4766

Game of the Week WinnerYou've Been Circy'd!
19th March, 2006 at 17:29:47 -

Angle Calculator object or something.

http://www.clickteam.info/extensions/

 
n/a

Diefox

Possibly Insane

Registered
  23/02/2003
Points
  3481

VIP MemberGOTM -SEPTEMBER 2009 - 2nd place!GOTW WINNER APRIL 2010!
19th March, 2006 at 18:36:37 -

i got direction calculator and advanced direction, but i dont know how to use any of those, i want them to have the same effect as when i use the "look at object" command.
help me please!

and other question:
lets say i have 5 of the same objects in a frame and each one of them has a different "Alterable A" value. i want to select the object with the LOWEST "Alterable A" value. please pleas please, help me in that matter!

 
__________
amandapps.com

Knudde (Shab)

Administrator
Crazy?

Registered
  31/01/2003
Points
  5125

Has Donated, Thank You!Clickzine StaffKlikCast StarVIP MemberGhostbuster!Dos Rules!I donated an open source project
19th March, 2006 at 18:39:25 -

Fastloops. I'm not quite sure how (I don't typically use fastloops, they're nearly useless in TGF) but search for some articles.

 
Craps, I'm an old man!

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
19th March, 2006 at 19:08:23 -

use the distance formula then check to see which ones number is the smallest. i dunno.

 
n/a

DaVince

This fool just HAD to have a custom rating

Registered
  04/09/2004
Points
  7998

Game of the Week WinnerClickzine StaffHas Donated, Thank You!Cardboard BoxDos Rules!
19th March, 2006 at 21:26:24 -

Do what you already did, but do it like this:

- Before checking: spread an alterable value of 1 in the object that should be checked. Then run a loop (amount of that object) times. Also, set a checker counter to 0.
- In the loop: add 1 to the checker counter.
- If alterable value is equal to the counter value + check x and y...

Ah, I got bored, but this should help you on your way.

 
Old member (~2004-2007).

Klikmaster

Master of all things Klik

Registered
  08/07/2002
Points
  2599

Has Donated, Thank You!You've Been Circy'd!VIP MemberPS3 Owner
19th March, 2006 at 22:16:29 -

Have 2 counters, counter1 should have a high initial value like 9999

1 - Spread value 0 in value A of object B
2 - Start fastloop (number of objectB times)
3 - On fastloop
+ value A of objectB = loopindex
+ distance between objectA and objectB < counter1 value
set counter1 value to distance between objectA and objectB
set counter2 to loopindex
4 - value of objectB = loopindex
make object A look at objectB
5 - Set counter1 back to 9999

 
n/a

DaVince

This fool just HAD to have a custom rating

Registered
  04/09/2004
Points
  7998

Game of the Week WinnerClickzine StaffHas Donated, Thank You!Cardboard BoxDos Rules!
19th March, 2006 at 22:18:38 -

@Phizzy: I knew what I wanted to type. Then homework came. Then I forgot what I wanted to type here again. So yeah.
Klikmaster kinda said what I wanted to say anyway.

Image Edited by the Author.

 
Old member (~2004-2007).

Joe.H

Evil Faker

Registered
  19/08/2002
Points
  3305
19th March, 2006 at 23:08:45 -

ololololol you said sex

kthxbai

 
My signature is never too big!!!
   

Post Reply



 



Advertisement

Worth A Click