Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- span class="re5"> fn_generateDrop = {
- params ["_plane"];
- private _boxType = "B_supplyCrate_F";
- private _chuteType = "B_Parachute_02_F";
- private _lightType = "chemlight_green";
- private _smokeType = "smokeShellGreen";
- _chute = createVehicle [_chuteType, [0,0,0], [], 0, "NONE"];
- _box = _boxType createVehicle (getposATL _chute);
- _chute disableCollisionWith _plane;
- _chute setpos getposATL _plane;
- _light = _lightType createVehicle getposATL _box;
- _smoke = _smokeType createVehicle getposATL _box;
- _box attachto [_chute,[0,0,0]];
- _light attachto [_box,[0,0,2]];
- _smoke attachto [_box,[0,0,2]];
- waituntil {sleep 1; getposATL _box select 2 < 3};
- sleep 2;
- detach _box;
- };
- _start = _debugPoints select 0;
- _target = _debugPoints select 1;
- _plane = createVehicle ["RHS_C130J", [_start select 0,_start select 1,100], [], 0, "FLY"];
- _plane setposATL [getpos _plane select 0, getpos _plane select 1, 300];
- _plane setdir (_plane getreldir _target);
- _heading = getdir _plane;
- _height = _plane flyinheight 300;
- _speed = 150;
- _velx = (sin _heading * _speed);
- _vely = (cos _heading * _speed);
- _plane setvelocity [_velx, _vely, 0];
- createVehicleCrew _plane;
- _wp = group _plane addWaypoint [_target, 0];
- _wp setWaypointType "MOVE";
- _wp setwayPointSpeed "LIMITED";
- waitUntil {sleep 1; getpos _plane distance2d _target < 300};
- hint 'drop';
- [_plane] spawn fn_generateDrop;
- _wp = group _plane addWaypoint [[0,0,0], 0];
- _wp setWaypointType "MOVE";
- _wp setwayPointSpeed "LIMITED";
- waitUntil {sleep 1; getposATL _plane distance2d _target > 2000};
- deletevehicle _plane;
- hint 'complete';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement