fn_configMenu.sqf 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. _logic = param [0,objNull,[objNull]];
  2. _units = param [1,[],[[]]];
  3. if !(local _logic) exitWith {};
  4. _position = getPos _logic;
  5. [
  6. "Beam Laser Strike", // title
  7. [ // array of controls for dialog
  8. ["COMBO", ["Beam Colour", "Colour of laser particles and glow"],
  9. [ // control args
  10. ["Default", "Red", "Orange", "Yellow", "Green", "Cyan", "Pink", "Purple"], // return values
  11. ["Default", "Red", "Orange", "Yellow", "Green", "Cyan", "Pink", "Purple"], // labels
  12. 0 // element 0 is default selected
  13. ]
  14. ],
  15. ["COMBO", ["Debris Colour", "Colour of dust kicked up by explosion"],
  16. [ // control args
  17. ["Default", "Mud", "Snow", "Sand"], // return values
  18. ["Default", "Mud", "Snow", "Sand"], // labels
  19. 0 // element 0 is default selected
  20. ]
  21. ]
  22. ],
  23. { // code run on dialog closed (only run if OK is clicked)
  24. params ["_dialogResult", "_args"];
  25. private _beamColour = _dialogResult#0;
  26. switch (_dialogResult#0) do { // select beam colour
  27. case "Default": {_beamColour = [1,0.6,0.2];}; // default
  28. case "Red": {_beamColour = [0.5,0,0];}; // red
  29. case "Orange": {_beamColour = [0.3,0.15,0.1];}; // orange
  30. case "Yellow": {_beamColour = [1,0.9,0];}; // yellow
  31. case "Green": {_beamColour = [0,0.5,0];}; // green
  32. case "Cyan": {_beamColour = [0,0.5,0.5];}; // cyan
  33. case "Pink": {_beamColour = [1,0,0.6];}; // pink
  34. case "Purple": {_beamColour = [0.5,0,1];}; // purple
  35. };
  36. private _debrisColour = _dialogResult#1;
  37. switch (_dialogResult#1) do { // select debris colour
  38. case "Default": {_debrisColour = [0.3, 0.27, 0.15];}; // default
  39. case "Mud": {_debrisColour = [0.15, 0.11, 0.08];}; // mud
  40. case "Snow": {_debrisColour = [1, 1, 1];}; // snow
  41. case "Sand": {_debrisColour = [1, 0.8, 0.3];}; // sand
  42. };
  43. private _beamTarget = "Land_HelipadEmpty_F" createVehicle _args#0;
  44. [_beamTarget, _beamColour, _debrisColour] remoteExec ["tts_beam_fnc_beam", 0, false]; // fire beam
  45. _beamTarget spawn {sleep 60; deleteVehicle _this;}; // wait and cleanup target pos
  46. }, {}, [_position] // args
  47. ] call zen_dialog_fnc_create;