edit a mission with a single blufor player;
place any kind of enemy units, not too far;
make sure this guy (unit) can't shoot at you (ammo to zero for example);
launch mission;
in debug console write:
0=[]spawn{while {true} do {hintSilent format ["who's this?: %1", typeof cursorTarget]}};
No matter if the enemy unit aim at you, you can be very close, cursortarget doesn't return anything!
return to editor;
add a friendly unit in your group;
avoid this unit firing at enemy (ammo 0);
launch mission;
cursortarget is OK because your fellow "knowsabout" the enemy (probably).