vicSpawner.sqf 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. try
  2. {
  3. pads=[
  4. [pad_middle,1],
  5. [pad_left,1],
  6. [pad_right,1]
  7. ];
  8. vics=[
  9. ["swop_LAAT","<t color='#00FF00'> Laat MK1</t>"],
  10. ["swop_LAATmk2","<t color='#00FF00'> Laat MK2</t>"],
  11. ["swop_LAATmk2_74","<t color='#F4A460 '> Laat MK2 74th</t>"],
  12. ["swop_LAATmk2_104","<t color='#0000FF'> Laat MK2 104th</t>"],
  13. ["swop_LAATmk2_spec","<t color='#FF0000'> Laat MK2 Spec Op</t>"],
  14. ["swop_LAATmk2_ARC","<t color='#00f9ff'> Laat MK2 ARC</t>"],
  15. ["swop_LAAT_cargo","<t color='#0000FF'> Laat Cargo</t>"],
  16. ["swop_arc_t","<t color='#FF0000'> ARC-170</t>"],
  17. ["swop_ywclones","<t color='#FFFF00'> Y-Wing</t>"]
  18. ];
  19. _this setVariable ["vicToSpawn",((vics select 0) select 0), false];
  20. _this setVariable ["padToSpawnOn",((pads select 0) select 0), false];
  21. _this setVariable ["heightOfPad",((pads select 0) select 1), false];
  22. for [{_i=0}, {_i<(count vics)}, {_i=_i+1}] do
  23. {
  24. titleOfAction=format["%1%2",_i, (vics select _i) select 1];
  25. _this addAction [titleOfAction,
  26. {
  27. itemNum=(_this select 2);
  28. (_this select 0) setVariable ["vicToSpawn",((vics select itemNum) select 0), false];
  29. itemNum="";
  30. }];
  31. };
  32. _this addAction ["<t color='#FF0000'>--------------------------------</t>",
  33. {
  34. hint "no-CC Bondo ^.^";
  35. }];
  36. for [{_i=0}, {_i<(count pads)}, {_i=_i+1}] do
  37. {
  38. titleOfAction=format["%1 %2",_i, (pads select _i) select 0];
  39. _this addAction [titleOfAction,
  40. {
  41. itemNum=(_this select 2)-(count vics)-1;
  42. (_this select 0) setVariable ["padToSpawnOn",((pads select itemNum) select 0), false];
  43. (_this select 0) setVariable ["heightOfPad",((pads select itemNum) select 1), false];
  44. itemNum="";
  45. }];
  46. };
  47. _this addAction ["<t color='#00FF00'>Spawn Vehicle</t>",
  48. {
  49. unitVic=(_this select 0) getVariable "vicToSpawn";
  50. unitPad=(_this select 0) getVariable "padToSpawnOn";
  51. unitPadHeight=(_this select 0) getVariable "heightOfPad";
  52. _unit=createVehicle [unitVic, [(getPos unitPad select 0), (getPos unitPad select 1), (getPos unitPad select 2)+unitPadHeight], [], 0,"CAN_COLLIDE"];
  53. _unit setDir (getDir unitPad);
  54. _unit="";
  55. unitVic="";
  56. unitPad="";
  57. unitPadHeight="";
  58. }];
  59. }
  60. catch
  61. {
  62. hint ("Vicspawner is broken, badger Namenai to fix it.");
  63. }
  64. //added try catch suck it namenai, okaie
  65. //why do we still have to use this script,why dont we remove it from all missions :(