laatClaymore.sqf 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. laatClaymoreIV={
  2. params ["_vic"];
  3. //if (!(_vic getVariable ["namReconfigured", false])) then
  4. //{
  5. comment "data for weapons";
  6. comment"format of [weapon,weaponMagType,[[seat,ammoPerMag,MagCount],[seat,ammoPerMag,MagCount],......etc]]";
  7. weaponData=[
  8. ["Cannon_LAAT","1000Rnd_Laser_Cannon_LAAT",[[-1,1000,2]]],
  9. ["missiles_Jian","4Rnd_LG_Jian",[[-1,10,8],[0,1,1]]],
  10. ["weapon_rim116Launcher","magazine_Missile_rim116_x21",[[-1,8,1],[0,21,1]]],
  11. ["Cannon_TIE_FAST","10Rnd_FAST_Cannon_TIE",[[1,10,100],[2,10,100]]],
  12. ["PomehiLauncherXT","400Rnd_Pomehi_Mag",[[-1,600,10]]],
  13. ["Laserdesignator_pilotCamera","Laserbatteries",[[-1,1,1]]]
  14. ];
  15. comment "remove torpedos";
  16. for [{_i=0}, {_i<2}, {_i=_i+1}] do
  17. {
  18. _vic removeMagazineTurret ["laat_proton_torpedo" ,[-1]];
  19. _vic removeWeaponTurret["laat_proton_torpedo_launcher", [-1]];
  20. };
  21. comment "For each weapon";
  22. for [{_i=0}, {_i<(count weaponData)}, {_i=_i+1}] do
  23. {
  24. itemList=weaponData select _i;
  25. itemWeapon=itemList select 0;
  26. itemMagType=itemList select 1;
  27. itemSeats=itemList select 2;
  28. comment "for each seat";
  29. for [{_j=0}, {_j<(count itemSeats)}, {_j=_j+1}] do
  30. {
  31. seatData=itemSeats select _j;
  32. seatIndex=seatData select 0;
  33. seatAmmoPerMag=seatData select 1;
  34. seatMags=seatData select 2;
  35. comment "adds mags";
  36. for [{_k=0}, {_k<(seatMags)}, {_k=_k+1}] do
  37. {
  38. _vic addWeaponTurret[itemWeapon, [seatIndex]];
  39. _vic addMagazineTurret [itemMagType ,[seatIndex],seatAmmoPerMag];
  40. };
  41. };
  42. };
  43. // _vic setVariable ["namReconfigured", true, true];
  44. //}
  45. // else {};
  46. comment "gets health";
  47. _vic addAction ["<t color='#00FF00'>Damage Report</t>",
  48. {
  49. hint parseText format["<t color='#0099FF'> Hull Integrity is :%1%2</t>",((1-(damage (_this select 0)))*100),"%"];
  50. },[1],0,false,true,""," driver _target == _this "];
  51. // function as file
  52. _vic addAction ["<t color='#886688'>Smoker--------U13</t>",
  53. {[_this select 0] execVM "scripts\zeus3denScripts\vehicleBased\actionMenu\Smoke\LAAT\laatSmokeTip.sqf";}
  54. ,[1],0,false,true,"User13"," driver _target == _this"];
  55. //for some reason laats dont show CM's,this is hopefully to get them to show
  56. _vic addWeaponTurret["PomehiLauncherXT", [-1]];
  57. _vic addMagazineTurret ["400Rnd_Pomehi_Mag" ,[-1],400];
  58. };
  59. //["swop_LAAT", "init",laatClaymoreIV, true, [], true] call CBA_fnc_addClassEventHandler;