atteTridentClass.sqf 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. //At-TE components
  2. //Created by Rexi
  3. //ye ole drop turret on which all stands
  4. params["_vic"];
  5. //The object that has the action menu to deploy this at-te
  6. _dropTurret=_vic;
  7. //The stomper that makes at-te move
  8. atte_drive = "B_UGV_01_rcws_F" createVehicle (getPosASL _dropTurret);
  9. //sleep 1;
  10. // create the ai crew to allow you to control the uav;
  11. createVehicleCrew atte_drive;
  12. // make invis,the uav that is; 0,1,2,3
  13. for [{_i=0}, {_i<(4)}, {_i=_i+1}] do
  14. {
  15. atte_drive setobjecttextureglobal [_i,""];
  16. };
  17. // remove cargo space of uav;
  18. [atte_drive, -1] call ace_cargo_fnc_setSpace;
  19. // damage the wheels of uav to set top speed: gives 3 speeds slow forward = 10km forward = 20km fast forward = 29km;
  20. {atte_drive setHitPointDamage[_x,0.90]} forEach ["HitLF2Wheel","HitRFWheel","HitRF2Wheel"];
  21. {atte_drive setHitPointDamage[_x,0.89]} forEach ["HitLFWheel"];
  22. //Workaround for weird issue that sometimes occurs
  23. atte_drive addAction ["<t color='#00FF00'>Fix Wheel Issue</t>",
  24. {
  25. _veh = nearestObject [player, "B_UGV_01_rcws_F"];
  26. _veh allowDamage true;
  27. {_veh setHitPointDamage[_x,0.90]} forEach ["HitLF2Wheel","HitRFWheel","HitRF2Wheel"];
  28. {_veh setHitPointDamage[_x,0.89]} forEach ["HitLFWheel"];
  29. {_veh setHitPointDamage[_x,0.89]} forEach ["HitLFWheel"];
  30. {_veh setHitPointDamage[_x,0.90]} forEach ["HitRMWheel","HitLMWheel"];
  31. _veh allowDamage false;
  32. },[1],0,false,true,""," driver _target == _this "];
  33. //dmgs lights
  34. atte_drive setHitIndex [20, 1];
  35. atte_drive setHitIndex [21, 1];
  36. atte_drive setHitIndex [22, 1];
  37. atte_drive setHitIndex [23, 1];
  38. atte_drive setHitIndex [24, 1];
  39. //cant take dmg the stomper
  40. atte_drive allowDamage false;
  41. atte_drive lockTurret [[1], true];
  42. // Remove the stompers weapons and add in smoke launcher and laser desig;
  43. atte_drive removeWeapon "HMG_127_UGV";
  44. atte_drive removeWeapon "GMG_40mm";
  45. atte_drive addWeaponTurret ["SmokeLauncher",[0]];
  46. for [{_i=0}, {_i<(5)}, {_i=_i+1}] do
  47. {
  48. atte_drive addMagazineTurret ["smokelaunchermag",[0]];
  49. };
  50. atte_drive addWeaponTurret ["Laserdesignator_mounted",[0]];
  51. atte_drive addMagazineTurret ["Laserbatteries",[0]];
  52. // create the infantry cargo;
  53. clearMagazineCargoGlobal atte_drive;
  54. atte_drive addMagazineCargoGlobal ["SWOP_DC15ABlasterRifle_Low_Mag", 40];
  55. atte_drive addMagazineCargoGlobal ["SWOP_DC15ABlasterRifle_Full_Mag", 10];
  56. atte_drive addMagazineCargoGlobal ["SWOP_DC15ABlasterRifle_Mag", 20];
  57. atte_drive addMagazineCargoGlobal ["SWOP_DC15_Mag", 10];
  58. clearItemCargoGlobal atte_drive;
  59. atte_drive addItemCargoGlobal ["ACE_elasticBandage", 40];
  60. atte_drive addItemCargoGlobal ["ACE_quikclot", 40];
  61. atte_drive addItemCargoGlobal ["ACE_morphine", 15];
  62. atte_drive addItemCargoGlobal ["ACE_epinephrine", 15];
  63. atte_drive addItemCargoGlobal ["ACE_plasmaIV_500", 40];
  64. atte_drive addItemCargoGlobal ["ACE_packingBandage", 20];
  65. atte_drive addItemCargoGlobal ["SW_SquadShield_Mag", 3];
  66. atte_drive addItemCargoGlobal ["B_UavTerminal", 5];
  67. //spawns a at-te on the dropturrets pos
  68. atte_body = "Republic_ATTE" createVehicle (getPosASL _dropTurret);
  69. atte_body attachTo [atte_drive,[0,-0.5,-2]];
  70. // ITT for troop transport;
  71. atte_mens = "O_SWOP_HoverTa_2" createVehicle (getPosASL _dropTurret);
  72. // Set the name and attach it to the Stomper;
  73. atte_mens attachTo [ATTE_DRIVE,[0,-4.2,1.9]];
  74. // make it invisible;
  75. (atte_mens) setobjecttextureglobal [0,""];
  76. // make it invulnerable remove the ammo
  77. atte_mens allowDamage false;
  78. atte_mens setvehicleammo 0;
  79. atte_mens lockDriver true;
  80. [atte_mens, 20] call ace_cargo_fnc_setSpace;
  81. // crewITT,purpose allows uav driver to sit there;
  82. atte_mens2 = "O_SWOP_HoverTa_2" createVehicle (getPosASL _dropTurret);
  83. // Set the name and attach it to the Stomper;
  84. atte_mens2 attachTo [ATTE_DRIVE,[0,1.9,1.9]];
  85. // make it invisible;
  86. (atte_mens2) setobjecttextureglobal [0,""];
  87. // "make it invulnerable remove the ammo and turn the lights and engine on";
  88. atte_mens2 allowDamage false;
  89. atte_mens2 setvehicleammo 0;
  90. atte_mens2 engineOn true;
  91. atte_mens2 setPilotLight true;
  92. atte_mens2 lockDriver true;
  93. [atte_mens2, -1] call ace_cargo_fnc_setSpace;
  94. // "remote desig,commanders laz dezer";
  95. atte_com = "swclonerecondroid" createVehicle (getPosASL _dropTurret);
  96. // Set the name and attach it to the Stomper;
  97. atte_com attachTo [ATTE_DRIVE,[0,0.9,8.8]];
  98. atte_com allowDamage false;
  99. createVehicleCrew atte_com;
  100. [atte_com, true] remoteExec ["hideObjectglobal", 0];
  101. //turrets that fire the laat cannons 1
  102. atte_gun1 = "B_HMG_01_A_F" createVehicle (getPosASL _dropTurret);
  103. ATTE_gun1 attachTo [ATTE_drive,[1.25,3.92,3.55]];
  104. ATTE_gun1 removeWeapon "HMG_static";
  105. ATTE_gun1 addWeaponTurret ["Cannon_LAAT",[0]];
  106. ATTE_gun1 addMagazineTurret ["1000Rnd_Laser_Cannon_LAAT",[0]];
  107. createVehicleCrew ATTE_gun1;
  108. atte_gun1 allowCrewInImmobile true;
  109. atte_gun1 disableAI "target";
  110. //turrets that fire the laat cannons 2
  111. atte_gun2 = "B_HMG_01_A_F" createVehicle (getPosASL _dropTurret);
  112. ATTE_gun2 attachTo [ATTE_drive,[-1.05,3.92,3.54]];
  113. atte_gun2 removeWeapon "HMG_static";
  114. atte_gun2 addWeaponTurret ["Cannon_LAAT",[0]]; ;
  115. atte_gun2 addMagazineTurret ["1000Rnd_Laser_Cannon_LAAT",[0]];
  116. createVehicleCrew ATTE_gun2;
  117. atte_gun2 allowCrewInImmobile true;
  118. atte_gun2 disableAI "target";
  119. //turrets that fire the laat cannons 3
  120. atte_gun3 = "B_HMG_01_A_F" createVehicle (getPosASL _dropTurret);
  121. ATTE_gun3 attachTo [ATTE_drive,[-0.75,-7.8,3.733]];
  122. atte_gun3 removeWeapon "HMG_static";
  123. atte_gun3 addWeaponTurret ["Cannon_LAAT",[0]];
  124. atte_gun3 addMagazineTurret ["1000Rnd_Laser_Cannon_LAAT",[0]];
  125. createVehicleCrew ATTE_gun3;
  126. atte_gun3 disableAI "target";
  127. atte_gun3 setdir 180;
  128. atte_gun3 allowCrewInImmobile true;
  129. //Stores the varible names of all objects
  130. atte_body setVariable ["atteObjectsOnIt", [atte_drive,atte_com,atte_gun1,atte_gun2,atte_gun3],true];
  131. //deleted the drop turret
  132. deleteVehicle _dropTurret;