Jump to content

Recommended Posts

Posted (edited)

Hey scripters, I was hoping someone could help me with a pretty common script used in DCS campaigns where the player has to set his/her radio to the correct frequency before they are able to hear and/or see a message. I am looking for one in particular for the Harrier. I've dug around in the lua files and I think I've found the correct argument numbers etc but I just don't know how to put it all together into a proper script. Any help would be much appreciated.

 

Edit:

I know I'm close to figuring it out.

dofile(LockOn_Options.common_script_path..'Radio.lua')

local gettext = require("i_18n")
_ = gettext.translate

presets = {}
if get_aircraft_mission_data ~= nil then
  local  radio_from_mission = get_aircraft_mission_data("Radio")
  local  uvhf_radio = radio_from_mission[1]
  if uvhf_radio then
   for i = 1,26 do
       presets[i] = (uvhf_radio.channels[i] or 225 ) * 1e6
   end
  end
end

need_to_be_closed = true

 

This is the Radio 1 lua file, but I am just unsure of how to enter it properly in the Do Script function of the editor

Edited by Gunnar81
Posted (edited)

Found this on another topic after quite a bit of very specific searching in case anyone else was curious. Thanks to Sedlo for his work on this one a few years back

Edit: Moderators could probably delete this thread, I found a previous one.

Edited by Gunnar81
Duplicate thread found
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...