Draken35 Posted August 18, 2024 Posted August 18, 2024 (edited) I've been working on an ELINT script that uses getDetectedTargets() by the RWR of the unit and found an issue when the emissions of SAM's SR/TR radars are turned off and on with enableEmissions(). If the SR/TR starts the mission with emissions enabled, they are detected with out issues by getDetectedTargets() (with or without the RWR option), and stop been detectded, as expected, when enableEmissions(false) is issued. Problem is, that after that point it will never be detected again after enabling their emission again. Attached is a simple mission to illustrate this behavior. It has an SA-3 simplified site (1 SR, 1 TR and 1 LN) and an E-3 AWACS doing the detection. The radars start ON, and they are cycled ON and OFF every 10 seconds... This is the script driving it: Quote -- Radar on/off cycle state = 'ON' emissions = true trigger.action.outText('RADARs are '..state , 10 , false) timer.scheduleFunction(function(param, time) local g = Group.getByName('SAM') if state == 'ON' then state = 'OFF' emissions = false else state = 'ON' emissions = true end g:enableEmission(emissions) trigger.action.outText('RADARs are '..state , 10 , false) return timer.getTime()+10 end, {}, timer.getTime()+10) -- Detection loop timer.scheduleFunction(function(param, time) local u = Unit.getByName('AWACS') local DT = u:getController():getDetectedTargets(16) for _,t in pairs(DT) do trigger.action.outText(t.object:getName()..' detected by AWACS' , 10 , false) end return timer.getTime()+1 end, {}, timer.getTime()+1) RWR Bug Report.miz Edited August 21, 2024 by Draken35
Recommended Posts