SkynetIADS:addEarlyWarningRadar not working
vhirtham opened this issue · 1 comments
vhirtham commented
I used the following script in my sample mission:
do
IADSRed = SkynetIADS:create('IADSRed')
local IADSRedDebug = IADSRed:getDebugSettings()
IADSRedDebug.IADSStatus = true
IADSRedDebug.radarWentDark = true
IADSRedDebug.contacts = true
IADSRedDebug.radarWentLive = true
IADSRedDebug.noWorkingCommmandCenter = false
IADSRedDebug.ewRadarNoConnection = false
IADSRedDebug.samNoConnection = false
IADSRedDebug.jammerProbability = true
IADSRedDebug.addedEWRadar = false
IADSRedDebug.hasNoPower = false
IADSRedDebug.harmDefence = true
IADSRedDebug.samSiteStatusEnvOutput = true
IADSRedDebug.earlyWarningRadarStatusEnvOutput = true
IADSRedDebug.commandCenterStatusEnvOutput = true
IADSRed:addEarlyWarningRadar('SA-11 3')
IADSRed:addSAMSite('SA-11 1')
IADSRed:addSAMSite('SA-11 2')
IADSRed:activate()
end
The debug output shows both sams but no early warning radar. If I exchange addEarlyWarningRadar
with addEarlyWarningRadarsByPrefix
it shows up. I can also add it as SAM without problems. Just started with Lua, so I am not able to fix it myself and open a PR :(
vhirtham commented
After glimpsing through the code and rereading the manual, I found my mistake:
Adding single early warning radars requires the name of a single unit inside of a group and not the group name. Adding sams on the other hand requires the group name. I wasn't really aware of the destinction between unit and group.
So everything is fine.