i have been trying to find a way to get a script to detect the nearest enemy unit to the player, and ideally the nearest unit of a certain type. does anyone know of a command to do this. the nearest i have found was the nearestobject command, but that doesnt seem to work on units.