vwingarrow.sqf 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. //Vwing fix created by Rexi
  2. arrow={
  3. params["_vic"];
  4. comment "data for weapons";
  5. comment"format of [weapon,weaponMagType,[[seat,ammoPerMag,MagCount],[seat,ammoPerMag,MagCount],......etc]]";
  6. weaponData=[
  7. ["weapon_rim116Launcher","magazine_Missile_rim116_x21",[[-1,20,1]]],
  8. ["PomehiLauncherXT","400Rnd_Pomehi_Mag",[[-1,21,10]]],
  9. ["Cannon_Vwing_FAST","10Rnd_Cannon_Vwing",[[-1,20,20]]],
  10. ["CMFlareLauncher","300Rnd_CMFlare_Chaff_Magazine",[[-1,300,10]]]
  11. ];
  12. comment "For each weapon";
  13. for [{ _i=0 }, { _i<(count weaponData)}, {_i=_i+1}] do
  14. {
  15. itemList=weaponData select _i;
  16. itemWeapon=itemList select 0;
  17. itemMagType=itemList select 1;
  18. itemSeats=itemList select 2;
  19. comment "for each seat";
  20. for [{ _j=0}, { _j<(count itemSeats)}, {_j=_j+1}] do
  21. {
  22. seatData=itemSeats select _j;
  23. seatIndex=seatData select 0;
  24. seatAmmoPerMag=seatData select 1;
  25. seatMags=seatData select 2;
  26. _vic addWeaponTurret[itemWeapon, [seatIndex]];
  27. comment "adds mags";
  28. for [{_k=0}, {_k<(seatMags)}, {_k=_k+1}] do
  29. {
  30. _vic addMagazineTurret [itemMagType ,[seatIndex],seatAmmoPerMag];
  31. };
  32. };
  33. };//end weapon additon
  34. comment "gets health";
  35. _vic addAction ["<t color='#00FF00'>Damage Report</t>",
  36. {
  37. hint parseText format["<t color='#0099FF'> Hull Integrity is :%1%2</t>",((1-(damage (_this select 0)))*100),"%"];
  38. },[1],0,false,true,""," driver _target == _this "];
  39. comment "Increment Throttle";
  40. _vic addAction ["<t color='#0000FF'>Increment Throttle--------U16</t>",
  41. {
  42. (_this select 0) setAirplaneThrottle ((airplaneThrottle (_this select 0))+.01);
  43. },[1],0,false,true,"User16","driver _target == _this"];
  44. comment "Decrement Throttle";
  45. _vic addAction ["<t color='#FF0000'>Decrement Throttle--------U17</t>",
  46. {
  47. (_this select 0) setAirplaneThrottle ((airplaneThrottle (_this select 0))-0.01);
  48. },[1],0,false,true,"User17","driver _target == _this"];
  49. Comment "Set Mass Style";
  50. _vic addAction ["<t color='#00FF00'>High Maneuverability</t>", {
  51. (_this select 0) setmass 28000;
  52. },[1],0,false,true,""," driver _target == _this "];
  53. Comment "Set Mass Style";
  54. _vic addAction ["<t color='#00FF00'>Mid High Maneuverability</t>", {
  55. (_this select 0) setmass 24000;
  56. },[1],0,false,true,""," driver _target == _this "];
  57. _vic setmass 18000;
  58. _vic addAction ["<t color='#00FF00'>Standard Maneuverability</t>", {
  59. (_this select 0) setmass 18000;
  60. },[1],0,false,true,""," driver _target == _this "];
  61. };
  62. ["swop_Vwing", "init",arrow, true, [], true] call CBA_fnc_addClassEventHandler;