21.07.2013, 20:37
Is the forklift ID in (IsATruck)? That would be the only cause for the reason i removed:
Thats what I originally posted.
Quote:
Its because most vehicle positions are the Center of the Vehicle. Let me explain. [ x ] Truck [ x ] Forklift. [x] Box Now I havn't read you code but I am assuming your using the Box position to find the closest vehicle however that wouldn't work is your cars are arranged like this: [ x ][x][ x ] In this example the Center of the box is closest to the forklift therefore the Fork Lift is the closet vehicle according to the Game Engine. Whereas the truck is 7 spaces away the fork lift is 3. Reading your code and then i will alter this post. |