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.
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!
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
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.
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
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.