There are some serious pending problems to solve here:
1 - If the leader dies with the units catched (a tank fired at him from long range) and nobody aproaches the area, the catched units remain catched forever.
2 - If the leader dies same as in first case and some one aproaches the area few seconds later, the group of the leader is not existing anymore (after deleting his units he was the last unit remaining in that group), and the units cannot be created in relative positions to the unnexistant leader of an unnexistant group.
3 - In the case that everything goes well (leader happy and alive when desired units reaches his area), the skill/ranks of the catched units are not recovered.
4 - The script accept one side as parameter, so, to have the units precatched when more than one side is close, the script must be running as many times as needed sides.
5 - The precatching units doesnt work when catching for the same side. As an example, there are many BLUFOR groups you want to catch and you want to uncatch them when player (BLUFOR also) is close enough.
6 - If there are units of the group inside a vehice or several vehicles, they are created outside the vehicle (for example, an M1 tank in the group, you aproaches and the crew is created outside and not assigned anymore to the tank). In fact, the tank should be: a) precatched too b) leave the tank there but kill the catched crew if the tank is destroyed. This affects also to static MGs used by members of the group, etc.