Spectrum Device – Arma 3
Lou Montana (talk | contribs) m (Text replacement - "\{\{Wikipedia *\| *([a-zA-Z0-9_#]+) *\| *([a-zA-Z0-9_ #]+) *\}\}" to "{{Link|https://en.wikipedia.org/$1|$2}}") |
(added example how to show the UI) |
||
(One intermediate revision by one other user not shown) | |||
Line 33: | Line 33: | ||
[[File:contact spectrumAnalyzer.jpg|512px]] [[File:contact spectrumAnalyzerTransmit.jpg|512px]]<br> | [[File:contact spectrumAnalyzer.jpg|512px]] [[File:contact spectrumAnalyzerTransmit.jpg|512px]]<br> | ||
<small style="color: grey">The images display values set by the following code examples.</small> | <small style="color: grey">The images display values set by the following code examples.</small> | ||
== Display the UI == | |||
<sqf> | |||
private _ctrlGroup = findDisplay 46 ctrlCreate ["ctrlControlsGroupNoScrollbars", -1]; | |||
_ctrlGroup ctrlSetPosition [safeZoneX, safeZoneY, safeZoneW, safeZoneH]; | |||
_ctrlGroup ctrlCommit 0; | |||
[_ctrlGroup] call BIN_fnc_showPlayerSpectrumAnalyzer; | |||
</sqf> | |||
=== Frequency === | === Frequency === | ||
Frequency range in which the analyzer operates. The values are in {{Link|https://en.wikipedia.org/Megahertz|MHz}}. | Frequency range in which the analyzer operates. The values are in {{Link|https://en.wikipedia.org/wiki/Megahertz|MHz}}. | ||
<sqf> | <sqf> | ||
missionNamespace setVariable ["#EM_FMin", 140]; | missionNamespace setVariable ["#EM_FMin", 140]; | ||
Line 44: | Line 54: | ||
=== Sensitivity === | === Sensitivity === | ||
Sensitivity of signals the analyzer is able to detect. The values are in {{Link|https://en.wikipedia.org/Decibel|dBm}}. | Sensitivity of signals the analyzer is able to detect. The values are in {{Link|https://en.wikipedia.org/wiki/Decibel|dBm}}. | ||
<sqf> | <sqf> | ||
missionNamespace setVariable ["#EM_SMin", -60]; | missionNamespace setVariable ["#EM_SMin", -60]; |
Latest revision as of 22:57, 16 April 2024
The 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.
The default Arma 3 version contains a light version of the device, which has a basic API for usage in scripts.
Features
On its own, the simplified system handles these features:
- Horizontal compass
- Spectrum line animation (i.e., noise)
- Player-controlled frequency selection (mouse wheel by default while in the 'sights' view)
All other features have to be controlled by user-made scripting, notably:
- Setting signal values (e.g., a stronger signal when pointing towards its source)
- Playing sounds
- Transmitting signals
Certain aspects are not supported at all:
- Signal labels (frequency and signal name above the peak)
- Selected signal to transmit (shown below the compass in Contact)
Spectrum Device
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.
The images display values set by the following code examples.
Display the UI
Frequency
Frequency range in which the analyzer operates. The values are in MHz.
Sensitivity
Sensitivity of signals the analyzer is able to detect. The values are in dBm.
Selected Frequency
Currently selected frequency. Must be within the frequency range, otherwise it will not be shown. The values are in MHz.
Since the player can change the selection, it is possible to use getVariable to get the current value.
Scanning Progress
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.
Transmission
To visualize transmitting, set the following variable to true.
Spectrum Signals
List of displayed signal values. The array is in format [frequency1, strength1, frequency2, strength2, ... frequencyN, strengthN].