Returns the nearest object of given type (or inherited classes) to given position within a sphere. Hardcoded radius is 50 meters.
Unlike with nearestObjects, where distance is measured in 2D space, nearestObject will be closest object in 3D space.
Note
in Operation Flashpoint, only objects of the exact provided class are found.
if an object ID is used (#Syntax 4, see #Example 2) the search range is unlimited
Note, that if you want to check for the nearest Unit you have to check for CAManBase instead of Man, since Man will also return any wildlife population in that area: