{"name":"Arma 3: Spectrum Device","title":"Arma 3: Spectrum Device","type":"topic","url":"https://community.bistudio.com/wiki/Arma_3:_Spectrum_Device","revid":373622,"updated":"2025-05-27T10:01:47Z","aliases":["Arma 3 Spectrum Device"],"markdown":"Arma 3 v1.96\n\nThe Spectrum Device is a tool / feature introduced in Arma 3 Contact. It's *fully* integrated only in the optionally loaded expansion data, relying on systems that cannot exist outside of Contact.\n\nThe default Arma 3 version contains a light version of the device, which has a basic API for usage in scripts.\n\n> [!IMPORTANT]\n> This is documentation for the Spectrum Device in the vanilla game's sandbox. It will not work as described when the spin-off Arma 3 Contact expansion is loaded into the game.\n> Keep in mind that players need to own Arma 3 Contact in order to pick up the device and use it without restrictions (it can still be added by script, but DLC purchase notifications will be shown).\n\n### Features\n\nOn its own, the simplified system handles these features:\n\n- Horizontal compass\n- Spectrum line animation (i.e., noise)\n- Player-controlled frequency selection (mouse wheel by default while in the 'sights' view)\n\nAll other features have to be controlled by user-made scripting, notably:\n\n- Setting signal values (e.g., a stronger signal when pointing towards its source)\n- Playing sounds\n- Transmitting signals\n\nCertain aspects are not supported at all:\n\n- Signal labels (frequency and signal name above the peak)\n- Selected signal to transmit (shown below the compass in Contact)\n\n### Spectrum Device\n\nThe device can be configured using global variables. Since the device is calculated locally, it is possible to set different values on each client in multiplayer.\n\nThe images display values set by the following code examples.\n\n### Display the UI\n\n```sqf\nprivate _ctrlGroup = findDisplay 46 ctrlCreate [\"ctrlControlsGroupNoScrollbars\", -1];\n_ctrlGroup ctrlSetPosition [safeZoneX, safeZoneY, safeZoneW, safeZoneH];\n_ctrlGroup ctrlCommit 0;\n\n[_ctrlGroup] call BIN_fnc_showPlayerSpectrumAnalyzer;\n```\n\n#### Frequency\n\nFrequency range in which the analyzer operates. The values are in [MHz](https://en.wikipedia.org/wiki/Megahertz).\n\n```sqf\nmissionNamespace setVariable [\"#EM_FMin\", 140];\nmissionNamespace setVariable [\"#EM_FMax\", 143];\n```\n\n#### Sensitivity\n\nSensitivity of signals the analyzer is able to detect. The values are in [dBm](https://en.wikipedia.org/wiki/DBm).\n\n```sqf\nmissionNamespace setVariable [\"#EM_SMin\", -60];\nmissionNamespace setVariable [\"#EM_SMax\", -10];\n```\n\n#### Selected Frequency\n\nCurrently selected frequency. Must be within the frequency range, otherwise it will not be shown. The values are in MHz.\n\n```sqf\nmissionNamespace setVariable [\"#EM_SelMin\", 141.6];\nmissionNamespace setVariable [\"#EM_SelMax\", 141.9];\n```\n\nSince the player can change the selection, it is possible to use getVariable to get the current value.\n\n#### Scanning Progress\n\nWhen a signal is selected, it is possible to progress the scanning bar by setting the following variable. The value is in a range from 0 to 1.\n\n```sqf\nmissionNamespace setVariable [\"#EM_Progress\", 0.5];\n```\n\n#### Transmission\n\nTo visualize transmitting, set the following variable to true.\n\n```sqf\nmissionNamespace setVariable [\"#EM_Transmit\", true];\n```\n\n#### Spectrum Signals\n\nList of displayed signal values. The array is in format *[frequency1, strength1, frequency2, strength2, ... frequencyN, strengthN]*.\n\n```sqf\nmissionNamespace setVariable [\"#EM_Values\", [141.8, -30, 140.85, -50, 141.12, -40]];\n```","sections":[{"heading":null,"level":1,"markdown":"Arma 3 v1.96\n\nThe Spectrum Device is a tool / feature introduced in Arma 3 Contact. It's *fully* integrated only in the optionally loaded expansion data, relying on systems that cannot exist outside of Contact.\n\nThe default Arma 3 version contains a light version of the device, which has a basic API for usage in scripts.\n\n> [!IMPORTANT]\n> This is documentation for the Spectrum Device in the vanilla game's sandbox. It will not work as described when the spin-off Arma 3 Contact expansion is loaded into the game.\n> Keep in mind that players need to own Arma 3 Contact in order to pick up the device and use it without restrictions (it can still be added by script, but DLC purchase notifications will be shown)."},{"heading":"Features","level":3,"markdown":"On its own, the simplified system handles these features:\n\n- Horizontal compass\n- Spectrum line animation (i.e., noise)\n- Player-controlled frequency selection (mouse wheel by default while in the 'sights' view)\n\nAll other features have to be controlled by user-made scripting, notably:\n\n- Setting signal values (e.g., a stronger signal when pointing towards its source)\n- Playing sounds\n- Transmitting signals\n\nCertain aspects are not supported at all:\n\n- Signal labels (frequency and signal name above the peak)\n- Selected signal to transmit (shown below the compass in Contact)"},{"heading":"Spectrum Device","level":3,"markdown":"The device can be configured using global variables. Since the device is calculated locally, it is possible to set different values on each client in multiplayer.\n\nThe images display values set by the following code examples."},{"heading":"Display the UI","level":3,"markdown":"```sqf\nprivate _ctrlGroup = findDisplay 46 ctrlCreate [\"ctrlControlsGroupNoScrollbars\", -1];\n_ctrlGroup ctrlSetPosition [safeZoneX, safeZoneY, safeZoneW, safeZoneH];\n_ctrlGroup ctrlCommit 0;\n\n[_ctrlGroup] call BIN_fnc_showPlayerSpectrumAnalyzer;\n```"},{"heading":"Frequency","level":4,"markdown":"Frequency range in which the analyzer operates. The values are in [MHz](https://en.wikipedia.org/wiki/Megahertz).\n\n```sqf\nmissionNamespace setVariable [\"#EM_FMin\", 140];\nmissionNamespace setVariable [\"#EM_FMax\", 143];\n```"},{"heading":"Sensitivity","level":4,"markdown":"Sensitivity of signals the analyzer is able to detect. The values are in [dBm](https://en.wikipedia.org/wiki/DBm).\n\n```sqf\nmissionNamespace setVariable [\"#EM_SMin\", -60];\nmissionNamespace setVariable [\"#EM_SMax\", -10];\n```"},{"heading":"Selected Frequency","level":4,"markdown":"Currently selected frequency. Must be within the frequency range, otherwise it will not be shown. The values are in MHz.\n\n```sqf\nmissionNamespace setVariable [\"#EM_SelMin\", 141.6];\nmissionNamespace setVariable [\"#EM_SelMax\", 141.9];\n```\n\nSince the player can change the selection, it is possible to use getVariable to get the current value."},{"heading":"Scanning Progress","level":4,"markdown":"When a signal is selected, it is possible to progress the scanning bar by setting the following variable. The value is in a range from 0 to 1.\n\n```sqf\nmissionNamespace setVariable [\"#EM_Progress\", 0.5];\n```"},{"heading":"Transmission","level":4,"markdown":"To visualize transmitting, set the following variable to true.\n\n```sqf\nmissionNamespace setVariable [\"#EM_Transmit\", true];\n```"},{"heading":"Spectrum Signals","level":4,"markdown":"List of displayed signal values. The array is in format *[frequency1, strength1, frequency2, strength2, ... frequencyN, strengthN]*.\n\n```sqf\nmissionNamespace setVariable [\"#EM_Values\", [141.8, -30, 140.85, -50, 141.12, -40]];\n```"}],"categories":["Arma 3: Editing","Introduced with Arma 3 version 1.96"],"groups":["General"]}