Jump to content

Request: Add ILS/Localiser/Radio/TACAN/NDB stuff to DCS Scripting Engine API for all Maps/Runways/Airways


Recommended Posts

Posted

We can't get access to this data from the scripting engine because it's outside in other files. 

Yet the game 'does' know about it all. 

It just needs exposing to the lua scripting engine. 

Thanks

Posted
16 hours ago, Elphaba said:

We can't get access to this data from the scripting engine because it's outside in other files.

You can access the Beacons.lua, Radio.lua, etc.

dofile(string.format("./Mods/terrains/%s/Radio.lua", env.mission.theatre)) -- makes the "radio" table available
if radio then
  for _, r in ipairs(radio) do
    -- do stuff like: r.frequency.UHF[2]
  end
end

 

  • Thanks 1
Posted
19 hours ago, Chump said:

You can access the Beacons.lua, Radio.lua, etc.

dofile(string.format("./Mods/terrains/%s/Radio.lua", env.mission.theatre)) -- makes the "radio" table available
if radio then
  for _, r in ipairs(radio) do
    -- do stuff like: r.frequency.UHF[2]
  end
end

 

Wait, doesn't that mean I have to de-sanitise DCS to get access to dofile?

Posted
5 hours ago, Elphaba said:

Wait, doesn't that mean I have to de-sanitise DCS to get access to dofile?

Indeed it does. It will need the usage of require.

--_G['require'] = nil
Posted
4 hours ago, Chump said:

Indeed it does. It will need the usage of require.

--_G['require'] = nil

Thank you for your help, but then my point still stands. We shouldn't have to do that to get access to this data. 

  • Recently Browsing   0 members

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