Greetings peoples,
The easiest way to detect if a unit is out of range would be to check his distance from the leader. You could say about 50m is certainly out of formation, and 170m is lost. Perhaps something like:
_unit distance _leader > 50: hint format ["%1 is out of formation!" _unit]
_unit distance _leader > 170: hint format ["%1 is lost!" _unit]
However, there is, as deaddog said, no way to tell for sure if a unit is out of formation or lost, but the above codes should give a fairly good idea.
-Supr. Cmdr. PsyWarrior
-Psychic Productions