Difference between revisions of "DCS command setFrequency"
From DCS World Wiki - Hoggitworld.com
m (1 revision imported) |
|||
Line 12: | Line 12: | ||
|avail= All tasks types | |avail= All tasks types | ||
− | |desc= Changes the broadcasting frequency the AI will be using. | + | |desc= Changes the broadcasting frequency the AI will be using. |
+ | |||
+ | The mission editor UI generally displays frequency values in megahertz (MHz) while this command uses hertz for the value. To convert what the radio frequency would typically display in the aircraft simply multiply that value by 1000000. | ||
Line 22: | Line 24: | ||
frequency = number, | frequency = number, | ||
modulation = enum radio.modulation, | modulation = enum radio.modulation, | ||
+ | power = number, | ||
} | } | ||
} | } | ||
Line 30: | Line 33: | ||
modulation: Enum of radio modulation. AM or FM (0 or 1) | modulation: Enum of radio modulation. AM or FM (0 or 1) | ||
+ | |||
+ | power: Power of the radio in watts. 10 is a good default. | ||
'''Optional Parameters''': | '''Optional Parameters''': | ||
|enum= {{DCS_enum_radio_modulation}} | |enum= {{DCS_enum_radio_modulation}} | ||
|exam= | |exam= | ||
− | + | The following will set the frequency of someGroup to 131 Mhz AM. | |
+ | local freq = { | ||
+ | id = "SetFrequency", | ||
+ | params = { | ||
+ | power = 10, | ||
+ | modulation = 0, | ||
+ | frequency = 131000000, | ||
+ | } | ||
+ | } | ||
+ | Group.getByName("someGroup"):getController():setCommand(freq) | ||
|notes= | |notes= | ||
Latest revision as of 21:49, 12 January 2024