Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //vars
- _sleep = 0.3;
- _sleep2 = 0.1;
- _sleep3 = 0.66;
- _b = 0;
- planecounter;
- _AN2Create = createMarkerLocal ["AN2Create", [0,0,0]];
- _AN2Create setMarkerShapeLocal "ICON";
- "AN2Create" setMarkerTypeLocal "hd_destroy";
- onMapSingleClick "'AN2Create' setMarkerPosLocal _pos,ASclick = true";
- waitUntil {ASclick};
- onMapSingleClick "";
- ASclick = false;
- _AN2Target = createMarkerLocal ["AN2Target", [0,0,0]];
- _AN2Target setMarkerShapeLocal "ICON";
- "AN2Target" setMarkerTypeLocal "hd_destroy";
- onMapSingleClick "str(planecounter) setMarkerPosLocal _pos,ASclick = true";
- waitUntil {ASclick};
- onMapSingleClick "";
- ASclick = false;
- _planeGroup = createGroup West;
- _AN2CAS = createVehicle ["An2_1_TK_CIV_EP1", [(getMarkerPos "AN2Create") select 0,(getMarkerPos "AN2Create") select 1,100], [], 0, "FLY"];
- // _pilot = _planeGroup createUnit ["US_Pilot_Light_EP1", AN2Create, [], 0, "NONE"];
- //_pilot = planeGroup createUnit ["US_Pilot_Light_EP1", [1000,1000,1000], [], 0, "CAN_COLLIDE"];
- //_pilot assignAsDriver AN2CAS;
- //_pilot moveInDriver AN2CAS;
- // ""US_Pilot_Light_EP1" createUnit [getMarkerPos "AN2Create", planegroup];
- // (units planegroup select _x) moveInDriver AN2CAS;
- // _pilot = planeGroup createUnit ["US_Pilot_Light_EP1", [1000,1000,1000], [], 0, "CAN_COLLIDE"];
- _pilot = _planeGroup createUnit ["US_Pilot_Light_EP1", getPos _AN2CAS, [], 0, "CAN_COLLIDE"];
- _pilot assignAsDriver _AN2CAS;
- _pilot moveInDriver _AN2CAS;
- _planepos = position _AN2CAS;
- _targetpos = getmarkerpos _AN2Target;
- hint _targetpos;
- _difx = (_targetpos select 0)-(_planepos select 0);
- _dify = (_targetpos select 1)-(_planepos select 1);
- _difz = 0; //(_targetpos select 2)-(_planepos select 2);
- _difxs = _difx*_difx;
- _difys = _dify*_dify;
- _difzs = _difz*_difz;
- _difs = _difxs+_difys+_difzs;
- _dif = sqrt(_difs);
- _xvec = _difx/_dif;
- _yvec = _dify/_dif;
- _zvec = _difz/_dif;
- _AN2CAS setVectorDir [_xvec,_yvec,_zvec];
- _wp = _planeGroup addWaypoint [(getmarkerpos "AN2Target"), 0];
- _wp setWaypointSpeed "NORMAL";
- _wp setWaypointType "MOVE";
- planecounter = planecounter + 1;
- //bomb spawn
- for [{_b=1}, {_b<16}, {_b=_b+1}] do //bombs you dipshit
- {
- _Explosion="BO_Fab_250" createVehicle [1000, 1000, 1000]; //position _myVehicle;
- _Explosion attachTo [_AN2CAS, [4, 0, -2.2]];
- sleep _sleep2;
- detach _Explosion;
- _Explosion setVectorDir vectorDir _AN2CAS;
- _Explosion setVectorUp vectorUp _AN2CAS;
- _Explosion setVelocity velocity _AN2CAS;
- sleep _sleep;
- _Explosion="BO_Fab_250" createVehicle [1000, 1000, 1000]; //position _myVehicle;
- _Explosion attachTo [_AN2CAS, [-4, 0, -2.2]];
- sleep _sleep2;
- detach _Explosion;
- _Explosion setVectorDir vectorDir __AN2CAS;
- _Explosion setVectorUp vectorUp _AN2CAS;
- _Explosion setVelocity velocity _AN2CAS;
- sleep _sleep;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement