You could check the distance between the units of the group and the
heli with the distance command. What you do is: when the pickup
waypoint (or what else it is) is activate you can call a script that check
the distance for each soldier of the group to the heli. You can use two scripts:
the first calls the pickup script for each unit of the group, and the
pickup script checks distance and boards the unit, to evitate that a unit
that is 100 meters away from the others be moved in the chopper.
Then you must check if all units are aboard and release the heli to
its next waypoint :
(next code is untested, execute this after calling the aforementioned
scripts with [group,chopper] exec "this_script.sqs")
_units = units (_this select 0)
_helicopter = _this select 1
_i = 0
_aboard =true
_Max = count _units
#Here
? vehicle (_units select _i) != _helicopter: _aboard = false
_i= _i+1
~.5
? _i < _Max: goto "Here"
? _aboard: goto "Exit"
_i = 0
_aboard = true
goto "Here"
# Exit
; here set a global variable true to unlock the waypoint
exit
As for the rest: mail me if you can do that ! One thing that could be
done is to place an "emptydetector" or game logic unit above the
pickup point and check its position with the nearestbuilding command.
If you place it high enough it should detect only trees and tall building.
But I've never tangled with nearestbuilding command so I can't
guarantee you that it won't pick up the house 1 km away.
And, still, I don't know if nearestbuilding can detect trees. And, more,
if its range is variable as is nearestobject one, then ...
P.S.: I noted a possible error in groupload.sqs: if you start with
_i=1 then the group leader won't be put aboard the heli.
Lest the group leader is the player and so he boards it by himself.