ywingScylla.sqf 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. scylla={
  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. ["ProtonBombW","ProtonBombM",[[-1,8,3]]],
  9. ["ProtonBombWCLUSTER","ProtonBombMCluster",[[-1,8,6]]],
  10. ["Mg7_proton_torpedo_launcher","Mg7_proton_torpedo",[[-1,8,6]]],
  11. ["missiles_Jian","4Rnd_LG_Jian",[[-1,4,3]]],
  12. ["Bomb_04_Plane_CAS_01_F","4Rnd_Bomb_04_F",[[-1,4,1]]],
  13. ["BombCluster_01_F","PylonMissile_1Rnd_BombCluster_01_F",[[-1,4,2]]],
  14. ["weapon_rim116Launcher","magazine_Missile_rim116_x21",[[-1,4,1]]],
  15. ["PomehiLauncherXT","400Rnd_Pomehi_Mag",[[-1,400,10]]],
  16. ["Laserdesignator_pilotCamera","Laserbatteries",[[-1,1,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. _vic addWeaponTurret[itemWeapon, [seatIndex]];
  33. comment "adds mags";
  34. for [{_k=0}, {_k<(seatMags)}, {_k=_k+1}] do
  35. {
  36. _vic addMagazineTurret [itemMagType ,[seatIndex],seatAmmoPerMag];
  37. };
  38. };
  39. };
  40. // _vic setVariable ["namReconfigured", true, true];
  41. // }
  42. // else {};
  43. // function as file
  44. _vic addAction ["<t color='#886688'>Smoker--------U13</t>",
  45. {[_this select 0] execVM "scripts\zeus3denScripts\vehicleBased\actionMenu\Smoke\YWING\ywingSmokeTip.sqf";}
  46. ,[1],0,false,true,"User13"," driver _target == _this"];
  47. comment "gets health";
  48. _vic addAction ["<t color='#00FF00'>Damage Report</t>",
  49. {
  50. hint parseText format["<t color='#0099FF'> Hull Integrity is :%1%2</t>",((1-(damage (_this select 0)))*100),"%"];
  51. },[1],0,false,true,""," driver _target == _this "];
  52. comment "Increment Throttle";
  53. _vic addAction ["<t color='#0000FF'>Increment Throttle--------U16</t>",
  54. {
  55. (_this select 0) setAirplaneThrottle ((airplaneThrottle (_this select 0))+.01);
  56. },[1],0,false,true,"User16","driver _target == _this"];
  57. comment "Decrement Throttle";
  58. _vic addAction ["<t color='#FF0000'>Decrement Throttle--------U17</t>",
  59. {
  60. (_this select 0) setAirplaneThrottle ((airplaneThrottle (_this select 0))-0.01);
  61. },[1],0,false,true,"User17","driver _target == _this"];
  62. };
  63. ["swop_ywclones", "init",scylla, true, [], true] call CBA_fnc_addClassEventHandler;