Well not to let post flounder, I found this.
http://www.ofpec.com/editors/funcref.php?filter_cat=5#nearestObjnearestObj by General BarronCategory: Objects and Groups
Syntax: [Object,Array] call nearestObj
Returns: Object
Example: [player, ["grenade","grenadehand"]] call nearestobj, result is the "grenade" or "grenadehand" that is closest to player
Description:
This function works almost exactly like the in-game command nearestObject, only it can find the closest object out of an array of object types, instead of just one object type. It is similar to what a "nearestObject <class>" command would be like.
For example, you could find the nearest object out of an array of tank types, or the nearest castle wall (there are many types), or the nearest bullet, or whatever else you can think of. All you have to do is specify each object that can be returned in an array.
The type array can also be placed in a variable, and the variable placed where the array would be when calling the function. An example:
Quote:cover = ["FenceWood","wire","UralWreck"]
unit1 domove getpos ([unit1,cover] call nearestobject)
This function is limited in the same way as the nearestObject command. First off, you have to specify a unit, not a position to find the nearest object to (what it says in the command reference is wrong). Also, the max range is 50 meters!
Have fun!
I think if ya have anymore in depth Questions on this myabe ask The General B. directly. This is starting to get over my head.
Again hope this helps a little more