Hey, if you have time and will, you could tinker with nearTargets
. _this select 5 and _this select 0 are both PERCEIVED positions/perceived accuracy of position. Now, in theory, if the perceived position == the actual (getpos) position of the object, then that would mean the unit actually 'sees' the other unit, whereas the moment the unit is concealed, the discrepancy between actual and perceived should get bigger, right?
I suggest you experiment a bit with this, it might prove fruitful! It depends, of course, on how quickly the perceived position starts getting lost after the unit disappears from sight, and also on other AI issues (such as: if unit B sees an enemy and reports him in, will unit A also have 100% true perceived position of the enemy, despite not actually seeing the enemy?).
Do it for ArmA Scripting Science!