Does the nearestobject command actually return the value of the nearest unit, or is it strictly for objects like streetlights or buildings?
I'm only asking because, I noticed the nearestbuilding command on the command reference too.
nearestBuilding obj
Operand types:
obj: Object
Type of returned value:
Object
Description:
Nearest building to given object.
Example:
neareastBuilding player
So that would obviously return the nearest building to an object (the unit.)
But :
nearestObject pos
Operand types:
pos: Array
Type of returned value:
Object
Description:
Nearest building of given type to given position or object. pos may be [x,y,z, "type"] or [object, "type"].
Example:
nearestObject [player, "StreetLamp"]
Does this mean it will only return the nearest
building to an object (the unit), or position? If so, is there anyway to find the nearest unit to a unit?
I just don't seem to be having any luck trying to detect russian units using the nearestObject command. :-\