I'll dig it out of the mission tonight and post it up for you.
It's pretty basic from what I remember although a bit messy as I'm more a code "copy paster" than a code writer :P
Ok I have 3 empty markers on the map vehicleSpawn, vehicleDelivery, and vehicleDespawn. Pretty self explanatory as to what they do.
then in the code section of the vehicle spawner I have [["CUP_B_CH47F_GB","vehicleSpawn","vehicleDelivery", "vehicleDespawn"] execVM "scripts\slingload.sqf"]call BIS_fnc_MP;
which calls the script, you can use a different heli by changing the classname.
Then the frankenscript looks like this
if (!isServer) exitWith {}; // pull class names from arguments passed through execVM _heli_class = _this select 0; // marker positions _spawn = _this select 1; _spawn = getMarkerPos _spawn; _destination = _this select 2; _destination = getMarkerPos _destination; _despawn = _this select 3; _despawn = getMarkerPos _despawn; "Roger! BIGBIRD 2-1 inbound with your vehicle, ETA 8 minutes" remoteExec ["hint"]; //remoteExec [[west,"HQ"] sidechat"Roger! BIGBIRD 2-1 inbound with your vehicle, ETA 8 minutes"] //sleep 120; // spawn invisble helipad object for heli to target _helipad_obj = "Land_HelipadEmpty_F" createVehicle _destination; //while {true} do { // spawn heli _heli_spawn = [_spawn, 0, _heli_class, West] call BIS_fnc_spawnVehicle; _heli = _heli_spawn select 0; // safeguard it //_heli setCaptive True; _heli allowDamage false; // get heli's crew and assign waypoints _heli_grp = group (driver _heli); _heli disableAI "AUTOCOMBAT"; _heli_grp setFormation "WEDGE"; _heli_grp setBehaviour "SAFE"; _heli_grp setSpeedMode "NORMAL"; // delete all of heli crews' waypoints while {(count (wayPoints (_heli_grp) )) > 0} do { deleteWaypoint ((wayPoints (_heli_grp)) select 0); sleep 0.5; }; _mvWP = _heli_grp addWaypoint [_spawn,1]; _mvWP setWaypointType "HOOK"; sleep 5; // tell heli to move to and attempt to land at the destination _mvWP = _heli_grp addWaypoint [_destination,2]; _mvWP setWaypointType "UNHOOK"; // tell heli to move to and attempt to land at the destination _mvWP = _heli_grp addWaypoint [_despawn,3]; _mvWP setWaypointType "MOVE";
After that I have a trigger at the vehicleDespawn marker that deletes the chopper and crew.
Hope that makes sense