Advertisement
icdb

[ArmA3] Cruise Missile reworked

Apr 21st, 2018
278
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQF 2.64 KB | None | 0 0
  1.  
  2. private ["_posLaunch", "_target", "_path", "_pathS"];
  3. params["_posLaunch", "_target"];
  4.  
  5. _path = "/rhsusf/addons/rhsusf_a2port_air2/CruiseMissile/";
  6. _pathS = "/rhsusf/addons/rhsusf_c_a2port_air/scripts/missile/";
  7.  
  8. private ["_misL", "_misFlare"];
  9. _misL = "CruiseMissile1" createVehicle [(_posLaunch select 0), (_posLaunch select 1), -1];
  10.  
  11. _misFlare = "CruiseMissileFlare1" createVehicle [(_posLaunch select 0), (_posLaunch select 1), -1];
  12. _misFlare inflame true;
  13.  
  14. _misL setVelocity [0, 0, 20];
  15. [_misL] execVM (_pathS + "watersplash.sqf");
  16.  
  17. _misL setObjectTexture [0, "#(argb,8,8,3)color(0.501961,0.501961,0.501961,1.0,CO)"];
  18. _misL setObjectTexture [1, "#(argb,8,8,3)color(0.501961,0.501961,0.501961,1.0,CO)"];
  19. _misL setObjectTexture [2, "#(argb,8,8,3)color(0.501961,0.501961,0.501961,1.0,CO)"];
  20. _misL setObjectTexture [3, "#(argb,8,8,3)color(0,0,0,1.0,co)"];
  21.  
  22. _misL setVariable ["cruisemissile_level", false];
  23.  
  24. sleep 0.8;
  25.  
  26. [_misL, _misFlare] execVM (_pathS + "cruisemissileflare.sqf");
  27. _misL setObjectTexture [4, _path + "data/exhaust_flame_ca"];
  28. _misFlare say "CruiseMissileLaunch";
  29. [_misL] execVM (_pathS + "exhaust1.sqf");
  30. [_misL] execVM (_pathS + "exhaust3.sqf");
  31.  
  32. sleep 0.3;
  33.  
  34. [_misL] execVM (_pathS + "booster.sqf");
  35. [_misl, "RHS_9M79_1_K",_posLaunch,_target] execVM (_pathS + "missile_control.sqf");
  36.  
  37.  
  38. sleep 1;
  39.  
  40. _misL setObjectTexture [0, ""];
  41.  
  42. _misL animate ["Cover1", 1];
  43. _misL animate ["Cover2", 1];
  44. _misL animate ["Fin1", 1];
  45. _misL animate ["Fin2", 1];
  46. _misL animate ["Fin3", 1];
  47. _misL animate ["Fin4", 1];
  48. _misL animate ["Wing1", 1];
  49. _misL animate ["Wing2", 1];
  50. _misL animate ["Intake1", 1];
  51.  
  52. sleep 0.5;
  53.  
  54. _misL setObjectTexture [1, ""];
  55. _misL setObjectTexture [2, ""];
  56.  
  57. drop [_path + "cl_cover1", "", "SpaceObject", 1, 40, [-3, -3, -0.5], [-5, 0, 50], 2, 10.0, 1.0, 0, [1], [[1, 1, 1, 1]], [0, 1], 0, 0, "", "", _misL];
  58. drop [_path + "cl_cover1", "", "SpaceObject", 1, 40, [3, 3, -0.5], [5, 0, 50], 2, 10.0, 1.0, 0, [1], [[1, 1, 1, 1]], [0, 1], 0, 0, "", "", _misL];
  59.  
  60. waitUntil {getpos _misl select 2 > 10};
  61.  
  62. _misL setVariable ["cruisemissile_level", true];
  63.  
  64. _misL setObjectTexture [4, ""];
  65.  
  66. private ["_pos", "_vel", "_dir"];
  67. _pos = position _misL;
  68. _vel = velocity _misL;
  69. _dir = direction _misL;
  70. deleteVehicle _misL;
  71.  
  72. private ["_mis", "_pilot"];
  73. _mis = "RHS_ammo_BGM109" createVehicle _pos;
  74. _mis setDir ([_posLaunch, _target] call BIS_fnc_dirTo);
  75. _mis setVelocity [0,0,20];
  76.  
  77. drop [_path + "cl_booster1", "", "SpaceObject", 1, 40, [0, -5, 0], [0, 40, 0], 2, 3.0, 1.0, 0, [1], [[1, 1, 1, 1]], [0, 1], 0, 0, "", "", _mis];
  78.  
  79. [_mis, "RHS_9M79_1_K",_posLaunch,_target] execVM (_pathS + "missile_control.sqf");
  80.  
  81.  
  82. true
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement