ywingScylla.sqf 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. scylla={
  2. params["_vic"];
  3. if (!local _vic) exitWith {};
  4. comment "data for weapons";
  5. comment"format of [weapon,weaponMagType,[[seat,ammoPerMag,MagCount],[seat,ammoPerMag,MagCount],......etc]]";
  6. weaponData=[
  7. ["ProtonBombW","ProtonBombM",[[-1,8,3]]],
  8. ["ProtonBombWCLUSTER","ProtonBombMCluster",[[-1,8,6]]],
  9. ["Mg7_proton_torpedo_launcher","Mg7_proton_torpedo",[[-1,8,6]]],
  10. ["missiles_Jian","4Rnd_LG_Jian",[[-1,4,3]]],
  11. ["Bomb_04_Plane_CAS_01_F","4Rnd_Bomb_04_F",[[-1,4,1]]],
  12. ["BombCluster_01_F","PylonMissile_1Rnd_BombCluster_01_F",[[-1,4,2]]],
  13. ["weapon_rim116Launcher","magazine_Missile_rim116_x21",[[-1,4,1]]],
  14. ["SmokeLauncher","SmokeLauncherMag",[[-1,2,20]]],
  15. ["CMFlareLauncher","300Rnd_CMFlare_Chaff_Magazine",[[-1,300,10]]],
  16. ["PomehiLauncherXT","400Rnd_Pomehi_Mag",[[-1,400,10]]],
  17. ["Laserdesignator_pilotCamera","Laserbatteries",[[-1,1,1]]]
  18. ];
  19. comment "For each weapon";
  20. for [{_i=0}, {_i<(count weaponData)}, {_i=_i+1}] do
  21. {
  22. itemList=weaponData select _i;
  23. itemWeapon=itemList select 0;
  24. itemMagType=itemList select 1;
  25. itemSeats=itemList select 2;
  26. comment "for each seat";
  27. for [{_j=0}, {_j<(count itemSeats)}, {_j=_j+1}] do
  28. {
  29. seatData=itemSeats select _j;
  30. seatIndex=seatData select 0;
  31. seatAmmoPerMag=seatData select 1;
  32. seatMags=seatData select 2;
  33. _vic addWeaponTurret[itemWeapon, [seatIndex]];
  34. comment "adds mags";
  35. for [{_k=0}, {_k<(seatMags)}, {_k=_k+1}] do
  36. {
  37. _vic addMagazineTurret [itemMagType ,[seatIndex],seatAmmoPerMag];
  38. };
  39. };
  40. };
  41. // function as file
  42. _vic addAction ["<t color='#886688'>Smoker--------U13</t>",
  43. {[_this select 0] execVM "vehicleBased\actionMenu\Smoke\YWING\ywingSmokeTip.sqf";}
  44. ,[1],0,false,true,"User13"," driver _target == _this"];
  45. comment "gets health";
  46. _vic addAction ["<t color='#00FF00'>Damage Report</t>",
  47. {
  48. hint parseText format["<t color='#0099FF'> Hull Integrity is :%1%2</t>",((1-(damage (_this select 0)))*100),"%"];
  49. },[1],0,false,true,""," driver _target == _this "];
  50. comment "Increment Throttle";
  51. _vic addAction ["<t color='#0000FF'>Increment Throttle--------U16</t>",
  52. {
  53. (_this select 0) setAirplaneThrottle ((airplaneThrottle (_this select 0))+.01);
  54. },[1],0,false,true,"User16","driver _target == _this"];
  55. comment "Decrement Throttle";
  56. _vic addAction ["<t color='#FF0000'>Decrement Throttle--------U17</t>",
  57. {
  58. (_this select 0) setAirplaneThrottle ((airplaneThrottle (_this select 0))-0.01);
  59. },[1],0,false,true,"User17","driver _target == _this"];
  60. };
  61. ["swop_ywclones", "init",scylla, true, [], true] call CBA_fnc_addClassEventHandler;