laatClaymore.sqf 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. comment "data for weapons";
  2. weaponData=[
  3. ["Cannon_LAAT","1000Rnd_Laser_Cannon_LAAT",[[-1,1000,2]]],
  4. ["missiles_Jian","4Rnd_LG_Jian",[[-1,10,8],[0,1,1]]],
  5. ["weapon_rim116Launcher","magazine_Missile_rim116_x21",[[-1,8,1],[0,21,1]]],
  6. ["SmokeLauncher","SmokeLauncherMag",[[-1,2,20]]],
  7. ["CMFlareLauncher","300Rnd_CMFlare_Chaff_Magazine",[[-1,300,10]]],
  8. ["PomehiLauncherXT","400Rnd_Pomehi_Mag",[[-1,400,10]]],
  9. ["Cannon_TIE_FAST","10Rnd_FAST_Cannon_TIE",[[1,10,100],[2,10,100]]],
  10. ["Laserdesignator_pilotCamera","Laserbatteries",[[-1,1,1]]]
  11. ];
  12. comment "remove torpedos";
  13. for [{_i=0}, {_i<2}, {_i=_i+1}] do
  14. {
  15. _this removeMagazineTurret ["laat_proton_torpedo" ,[-1]];
  16. _this removeWeaponTurret["laat_proton_torpedo_launcher", [-1]];
  17. };
  18. comment "For each weapon";
  19. for [{_i=0}, {_i<(count weaponData)}, {_i=_i+1}] do
  20. {
  21. itemList=weaponData select _i;
  22. itemWeapon=itemList select 0;
  23. itemMagType=itemList select 1;
  24. itemSeats=itemList select 2;
  25. comment "for each seat";
  26. for [{_j=0}, {_j<(count itemSeats)}, {_j=_j+1}] do
  27. {
  28. seatData=itemSeats select _j;
  29. seatIndex=seatData select 0;
  30. seatAmmoPerMag=seatData select 1;
  31. seatMags=seatData select 2;
  32. _this addWeaponTurret[itemWeapon, [seatIndex]];
  33. comment "adds mags";
  34. for [{_k=0}, {_k<(seatMags)}, {_k=_k+1}] do
  35. {
  36. _this addMagazineTurret [itemMagType ,[seatIndex],seatAmmoPerMag];
  37. };
  38. };
  39. };
  40. comment "gets health";
  41. _this addAction ["<t color='#00FF00'>Damage Report</t>",
  42. {
  43. hint parseText format["<t color='#0099FF'> Damage status is :%1</t>",((1-(damage (_this select 0)))*100)];
  44. },[1],0,false,true,""," driver _target == _this "];