laatClaymore.sqf 1.7 KB

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