fn_customZeusModules.sqf 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. /*
  2. Author: TheTimidShade
  3. Description:
  4. Initialises custom modules for Achilles & ZEN if enabled
  5. Parameters:
  6. NONE
  7. Returns:
  8. NONE
  9. */
  10. sleep 1;
  11. if (!isNull (getAssignedCuratorLogic player) && {isClass (configFile >> "CfgPatches" >> "achilles_modules_f_achilles")}) then {
  12. ["Fire Support", "Beam Laser Strike",
  13. {
  14. params [["_position", [0,0,0], [[]], 3], ["_objectUnderCursor", objNull, [objNull]]];
  15. private _dialogResult = [
  16. "Beam Laser Strike",
  17. [
  18. ["Beam Colour", ["Default", "Red", "Orange", "Yellow", "Green", "Cyan", "Pink", "Purple"], 0],
  19. ["Debris Colour", ["Default", "Mud", "Snow", "Sand"], 0]
  20. ]
  21. ] call Ares_fnc_showChooseDialog;
  22. if (_dialogResult isEqualTo []) exitWith{}; // if dialog was closed exit
  23. private _beamColour = [1,0.6,0.2];
  24. switch (_dialogResult#0) do { // select beam colour
  25. case 0: {_beamColour = [1,0.6,0.2];}; // default
  26. case 1: {_beamColour = [0.5,0,0];}; // red
  27. case 2: {_beamColour = [0.3,0.15,0.1];}; // orange
  28. case 3: {_beamColour = [1,0.9,0];}; // yellow
  29. case 4: {_beamColour = [0,0.5,0];}; // green
  30. case 5: {_beamColour = [0,0.5,0.5];}; // cyan
  31. case 6: {_beamColour = [1,0,0.6];}; // pink
  32. case 7: {_beamColour = [0.5,0,1];}; // purple
  33. };
  34. private _debrisColour = [0.3, 0.27, 0.15];
  35. switch (_dialogResult#1) do { // select debris colour
  36. case 0: {_debrisColour = [0.3, 0.27, 0.15];}; // default
  37. case 1: {_debrisColour = [0.15, 0.11, 0.08];}; // mud
  38. case 2: {_debrisColour = [1, 1, 1];}; // snow
  39. case 3: {_debrisColour = [1, 0.8, 0.3];}; // sand
  40. };
  41. private _beamTarget = "Land_HelipadEmpty_F" createVehicle _position;
  42. [_beamTarget, _beamColour, _debrisColour] remoteExec ["tts_beam_fnc_beam", 0, false]; // fire beam
  43. _beamTarget spawn {sleep 60; deleteVehicle _this;}; // wait and cleanup target pos
  44. }] call Ares_fnc_RegisterCustomModule;
  45. };
  46. if (!isNull (getAssignedCuratorLogic player) && {isClass (configFile >> "CfgPatches" >> "zen_main")}) then {
  47. ["Fire Support", "Orbital Laser",
  48. {
  49. params [["_position", [0,0,0], [[]], 3], ["_attachedObject", objNull, [objNull]]];
  50. [
  51. "Beam Laser Strike", // title
  52. [ // array of controls for dialog
  53. ["COMBO", ["Beam Colour", "Colour of laser particles and glow"],
  54. [ // control args
  55. ["Default", "Red", "Orange", "Yellow", "Green", "Cyan", "Pink", "Purple"], // return values
  56. ["Default", "Red", "Orange", "Yellow", "Green", "Cyan", "Pink", "Purple"], // labels
  57. 0 // element 0 is default selected
  58. ]
  59. ],
  60. ["COMBO", ["Debris Colour", "Colour of dust kicked up by explosion"],
  61. [ // control args
  62. ["Default", "Mud", "Snow", "Sand"], // return values
  63. ["Default", "Mud", "Snow", "Sand"], // labels
  64. 0 // element 0 is default selected
  65. ]
  66. ]
  67. ],
  68. { // code run on dialog closed (only run if OK is clicked)
  69. params ["_dialogResult", "_args"];
  70. private _beamColour = _dialogResult#0;
  71. switch (_dialogResult#0) do { // select beam colour
  72. case "Default": {_beamColour = [1,0.6,0.2];}; // default
  73. case "Red": {_beamColour = [0.5,0,0];}; // red
  74. case "Orange": {_beamColour = [0.3,0.15,0.1];}; // orange
  75. case "Yellow": {_beamColour = [1,0.9,0];}; // yellow
  76. case "Green": {_beamColour = [0,0.5,0];}; // green
  77. case "Cyan": {_beamColour = [0,0.5,0.5];}; // cyan
  78. case "Pink": {_beamColour = [1,0,0.6];}; // pink
  79. case "Purple": {_beamColour = [0.5,0,1];}; // purple
  80. };
  81. private _debrisColour = _dialogResult#1;
  82. switch (_dialogResult#1) do { // select debris colour
  83. case "Default": {_debrisColour = [0.3, 0.27, 0.15];}; // default
  84. case "Mud": {_debrisColour = [0.15, 0.11, 0.08];}; // mud
  85. case "Snow": {_debrisColour = [1, 1, 1];}; // snow
  86. case "Sand": {_debrisColour = [1, 0.8, 0.3];}; // sand
  87. };
  88. private _beamTarget = "Land_HelipadEmpty_F" createVehicle _args#0;
  89. [_beamTarget, _beamColour, _debrisColour] remoteExec ["tts_beam_fnc_beam", 0, false]; // fire beam
  90. _beamTarget spawn {sleep 60; deleteVehicle _this;}; // wait and cleanup target pos
  91. }, {}, [_position] // args
  92. ] call zen_dialog_fnc_create;
  93. },
  94. "RD501_Zeus\ui\explosion_zeus_icon_small.paa"] call zen_custom_modules_fnc_register
  95. };