SHARE
TWEET

Untitled

a guest Aug 12th, 2017 47 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //vars
  2.  
  3.           _sleep = 0.3;
  4.           _sleep2 = 0.1;
  5.           _sleep3 = 0.66;
  6.           _b = 0;
  7.           planecounter;
  8.  
  9. _AN2Create = createMarkerLocal ["AN2Create", [0,0,0]];
  10. _AN2Create setMarkerShapeLocal "ICON";
  11. "AN2Create" setMarkerTypeLocal "hd_destroy";
  12. onMapSingleClick "'AN2Create' setMarkerPosLocal _pos,ASclick = true";
  13. waitUntil {ASclick};
  14. onMapSingleClick "";
  15. ASclick = false;
  16.  
  17. _AN2Target = createMarkerLocal ["AN2Target", [0,0,0]];
  18. _AN2Target setMarkerShapeLocal "ICON";
  19. "AN2Target" setMarkerTypeLocal "hd_destroy";
  20. onMapSingleClick "str(planecounter) setMarkerPosLocal _pos,ASclick = true";
  21. waitUntil {ASclick};
  22. onMapSingleClick "";
  23. ASclick = false;
  24.  
  25. _planeGroup = createGroup West;
  26. _AN2CAS = createVehicle ["An2_1_TK_CIV_EP1", [(getMarkerPos "AN2Create") select 0,(getMarkerPos "AN2Create") select 1,100], [], 0, "FLY"];
  27. // _pilot = _planeGroup createUnit ["US_Pilot_Light_EP1", AN2Create, [], 0, "NONE"];
  28. //_pilot = planeGroup createUnit ["US_Pilot_Light_EP1", [1000,1000,1000], [], 0, "CAN_COLLIDE"];
  29. //_pilot assignAsDriver AN2CAS;
  30. //_pilot moveInDriver AN2CAS;
  31.  
  32. //      ""US_Pilot_Light_EP1" createUnit [getMarkerPos "AN2Create", planegroup];
  33. //      (units planegroup select _x) moveInDriver AN2CAS;
  34.  
  35. // _pilot = planeGroup createUnit ["US_Pilot_Light_EP1", [1000,1000,1000], [], 0, "CAN_COLLIDE"];
  36. _pilot = _planeGroup createUnit ["US_Pilot_Light_EP1", getPos _AN2CAS, [], 0, "CAN_COLLIDE"];
  37. _pilot assignAsDriver _AN2CAS;
  38. _pilot moveInDriver _AN2CAS;
  39.  
  40. _planepos = position _AN2CAS;
  41. _targetpos = getmarkerpos _AN2Target;
  42. hint _targetpos;
  43. _difx = (_targetpos select 0)-(_planepos select 0);
  44. _dify = (_targetpos select 1)-(_planepos select 1);
  45. _difz =  0; //(_targetpos select 2)-(_planepos select 2);
  46. _difxs = _difx*_difx;
  47. _difys = _dify*_dify;
  48. _difzs = _difz*_difz;
  49. _difs = _difxs+_difys+_difzs;
  50. _dif = sqrt(_difs);
  51. _xvec = _difx/_dif;
  52. _yvec = _dify/_dif;
  53. _zvec = _difz/_dif;
  54. _AN2CAS setVectorDir [_xvec,_yvec,_zvec];
  55.  
  56.  
  57. _wp = _planeGroup addWaypoint [(getmarkerpos "AN2Target"), 0];
  58. _wp setWaypointSpeed "NORMAL";
  59. _wp setWaypointType "MOVE";
  60. planecounter = planecounter + 1;
  61.  
  62. //bomb spawn
  63. for [{_b=1}, {_b<16}, {_b=_b+1}] do //bombs you dipshit
  64. {
  65.  
  66.     _Explosion="BO_Fab_250" createVehicle [1000, 1000, 1000]; //position _myVehicle;
  67.     _Explosion attachTo [_AN2CAS, [4, 0, -2.2]];
  68.     sleep _sleep2;
  69.     detach _Explosion;
  70.     _Explosion setVectorDir vectorDir _AN2CAS;
  71.     _Explosion setVectorUp vectorUp _AN2CAS;
  72.     _Explosion setVelocity velocity _AN2CAS;
  73.     sleep _sleep;
  74.  
  75.     _Explosion="BO_Fab_250" createVehicle [1000, 1000, 1000]; //position _myVehicle;
  76.     _Explosion attachTo [_AN2CAS, [-4, 0, -2.2]];
  77.     sleep _sleep2;
  78.     detach _Explosion;  
  79.     _Explosion setVectorDir vectorDir __AN2CAS;
  80.     _Explosion setVectorUp vectorUp _AN2CAS;
  81.     _Explosion setVelocity velocity _AN2CAS;
  82.     sleep _sleep;
  83.  
  84. };
RAW Paste Data
Top