atte.sqf 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. #include "../../config_macros.hpp"
  2. params[
  3. ["_vic",objNull ,[player]]
  4. ];
  5. //if we cant use sleep ,spawn this cript
  6. if (!canSuspend) exitWith {
  7. _vic spawn macro_fnc_name(atte_uav_init);
  8. };
  9. //if not the server,exit
  10. if (!isServer) exitWith {};
  11. //check if still alive or if deleted
  12. if(isNull _vic || !(alive _vic)) exitWith {
  13. };
  14. //give some time for stomper to spawn
  15. sleep 1;
  16. //check if still alive or if deleted agin
  17. if(isNull _vic || !(alive _vic)) exitWith {
  18. };
  19. //create and check AT-TE
  20. _atte_tank = createVehicle [MACRO_QUOTE(macro_new_vehicle(ATTE,MkII)), getPosASL _vic, [], 0, 'CAN_COLLIDE'];
  21. if(isNull _atte_tank) exitWith {
  22. };
  23. //adds the ability to check how much dmg the at-te has taken
  24. _atte_tank addAction ["<t color='#00FF00'>Hull Damage Report</t>",
  25. {
  26. hint parseText format["<t color='#0099FF'> Hull Integrity is :%1%2</t>",((1-(damage (_this select 0)))*100),"%"];
  27. }];
  28. //add EH to delete all on death
  29. _vic call macro_fnc_name(add_remove_attached_EH);
  30. [_vic, -1] call ace_cargo_fnc_setSpace;
  31. // _vic setHitIndex [20, 1];
  32. // _vic setHitIndex [21, 1];
  33. // _vic setHitIndex [22, 1];
  34. // _vic setHitIndex [23, 1];
  35. // _vic setHitIndex [24, 1];
  36. _vic allowDamage false;
  37. _vic lockTurret [[1], true];
  38. clearMagazineCargoGlobal _vic;
  39. clearItemCargoGlobal _vic;
  40. _vic addItemCargoGlobal ["ACE_elasticBandage", 40];
  41. _vic addItemCargoGlobal ["ACE_quikclot", 40];
  42. _vic addItemCargoGlobal ["ACE_morphine", 15];
  43. _vic addItemCargoGlobal ["ACE_epinephrine", 15];
  44. _vic addItemCargoGlobal ["ACE_plasmaIV_500", 40];
  45. _vic addItemCargoGlobal ["ACE_packingBandage", 20];
  46. _vic addItemCargoGlobal ["SW_SquadShield_Mag", 3];
  47. _vic addItemCargoGlobal ["B_UavTerminal", 5];
  48. //sleep .1;
  49. //finally put AT-TE on stomper
  50. _atte_tank attachTo [_vic,[0,0,-1.9]];
  51. //sleep 1;
  52. // create the ai crew to allow you to control the uav;
  53. // make invis,the uav that is; 0,1,2,3
  54. // for [{_i=0}, {_i<(4)}, {_i=_i+1}] do
  55. // {
  56. // _vic setobjecttextureglobal [_i,""];
  57. // };
  58. // remove cargo space of uav;
  59. // create the infantry cargo;
  60. // _atte_tank addMagazineCargoGlobal ["SWOP_DC15ABlasterRifle_Low_Mag", 40];
  61. // _atte_tank addMagazineCargoGlobal ["SWOP_DC15ABlasterRifle_Full_Mag", 10];
  62. // _atte_tank addMagazineCargoGlobal ["SWOP_DC15ABlasterRifle_Mag", 20];
  63. // _atte_tank addMagazineCargoGlobal ["SWOP_DC15_Mag", 10];
  64. //_vic attachTo [_atte_tank,[0,-0.5,-2]];
  65. [_vic,[0,-4.2,1.9]] spawn macro_fnc_name(create_itt);
  66. [_vic,[0,3.2,1.9]] spawn macro_fnc_name(create_itt);
  67. // // "remote desig,commanders laz dezer";
  68. // _atte_mens = "swclonerecondroid501" createVehicle (getPosASL _vic);
  69. // // Set the name and attach it to the Stomper;
  70. // _atte_mens attachTo [_atte_tank,[0,0.9,8.8]];
  71. // _atte_mens allowDamage false;
  72. // createVehicleCrew _atte_mens;
  73. // [_atte_mens, true] remoteExec ["hideObjectglobal", 0];
  74. [
  75. _atte_tank,
  76. MACRO_QUOTE(macro_new_vehicle(turret_ATTE,Front_Right_UAV)),
  77. [1.25,4.5,4]
  78. ] spawn macro_fnc_name(create_atte_turrets);
  79. [
  80. _atte_tank,
  81. MACRO_QUOTE(macro_new_vehicle(turret_ATTE,Front_Left_UAV)),
  82. [-1.05,4.5,4]
  83. ] spawn macro_fnc_name(create_atte_turrets);
  84. [
  85. _atte_tank,
  86. MACRO_QUOTE(macro_new_vehicle(turret_ATTE,Rear_UAV)),
  87. [-0.75,-7.8,3.733],
  88. 180
  89. ] spawn macro_fnc_name(create_atte_turrets);