arcXiphos.sqf 1.9 KB

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