icdb icon

[ArmA3] Better CruiseMissile

icdb | PRO | 04/11/18 04:35:34 PM UTC | 0 ⭐ | 434 👁️ | Never ⏰ | []
SQF |

2.81 KB

|

None

|

0 👍

/

0 👎

[(getPos player), (_this select 0)]  spawn {
  private ["_posLaunch", "_target", "_path", "_pathS"];
  _posLaunch = _this select 0;
  _target = _this select 1;
 
  _path = "\rhsusf\addons\rhsusf_a2port_air2\CruiseMissile\";
  _pathS = "\rhsusf\addons\rhsusf_c_a2port_air\scripts\missile\";
 
  private ["_misL", "_misFlare"];
  _misL = "span class="re5"> CruiseMissile1" createVehicle [(_posLaunch select 0), (_posLaunch select 1), -1];
 
  _misFlare = "span class="re5"> CruiseMissileFlare1" createVehicle [(_posLaunch select 0), (_posLaunch select 1), -1];
  _misFlare inflame true;
 
  _misL setVelocity [0, 0, 20];
  [_misL] execVM (_pathS + "span class="re5"> watersplash.sqf");
 
  _misL setObjectTexture [0, "#(argb,8,8,3)color(0.501961,0.501961,0.501961,1.0,CO)"];
  _misL setObjectTexture [1, "#(argb,8,8,3)color(0.501961,0.501961,0.501961,1.0,CO)"];
  _misL setObjectTexture [2, "#(argb,8,8,3)color(0.501961,0.501961,0.501961,1.0,CO)"];
  _misL setObjectTexture [3, "#(argb,8,8,3)color(0,0,0,1.0,co)"];
 
  _misL setVariable ["cruisemissile_level", false];
 
  sleep 0.8;
 
  [_misL, _misFlare] execVM (_pathS + "cruisemissileflare.sqf");
  _misL setObjectTexture [4, _path + "data\exhaust_flame_ca"];
  _misFlare say "CruiseMissileLaunch";
  [_misL] execVM (_pathS + "exhaust1.sqf");
  [_misL] execVM (_pathS + "exhaust3.sqf");
 
  sleep 0.3;
 
  [_misL] execVM (_pathS + "booster.sqf");
  [_misl, "RHS_9M79_1_K",_posLaunch,_target] execVM (_pathS + "missile_control.sqf");
 
 
  sleep 1;
 
  _misL setObjectTexture [0, ""];
 
  _misL animate ["Cover1", 1];
  _misL animate ["Cover2", 1];
  _misL animate ["Fin1", 1];
  _misL animate ["Fin2", 1];
  _misL animate ["Fin3", 1];
  _misL animate ["Fin4", 1];
  _misL animate ["Wing1", 1];
  _misL animate ["Wing2", 1];
  _misL animate ["Intake1", 1];
 
  sleep 0.5;
 
  _misL setObjectTexture [1, ""];
  _misL setObjectTexture [2, ""];
 
  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];
  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];
 
  waitUntil {getpos _misl select 2 > 10};
 
  _misL setVariable ["cruisemissile_level", true];
 
  _misL setObjectTexture [4, ""];
 
  private ["_pos", "_vel", "_dir"];
  _pos = position _misL;
  _vel = velocity _misL;
  _dir = direction _misL;
  deleteVehicle _misL;
 
  private ["_mis", "_pilot"];
  _mis = "RHS_ammo_BGM109" createVehicle _pos;
  _mis setDir ([_posLaunch, _target] call BIS_fnc_dirTo);
  _mis setVelocity [0,0,20];
 
  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];
 
  [_mis, "RHS_9M79_1_K",_posLaunch,_target] execVM (_pathS + "missile_control.sqf");
 
  true
}

Comments