stab-virtual-jabog32 / STTR-script

STTR script for Kola Map
GNU General Public License v3.0
0 stars 0 forks source link

Wofür ist das und wird das benötigt? Sonst bitte rausnehmen #6

Closed Holmson closed 1 week ago

Holmson commented 1 week ago

-- ############################################################################ -- ### LATN AREAS MANAGEMENT ### -- ############################################################################ function spawnLatn(area) for groupName, group in pairs(latn_areas[area]) do trigger.action.activateGroup(Group.getByName(groupName)) end

trigger.action.outText("AAA/SAM threats in " .. area .. " spawned.", 10)

end

function despawnLatn(range) for groupName, group in pairs(ranges[range]) do local grp = Group.getByName(groupName) local controller = grp:getController() controller:setOption(0, 4) -- ROE = WEAPON HOLD controller:setOnOff(false) trigger.action.deactivateGroup(grp) end

trigger.action.outText("AAA/SAM threats in " .. area .. " despawned.", 10)

end

function activateLatn(area) for groupName, group in pairs(latn_areas[area]) do local controller = Group.getByName(groupName):getController() controller:setOnOff(true)

    -- see https://wiki.hoggitworld.com/view/DCS_enum_AI
    controller:setOption(0, 2) -- ROE = OPEN FIRE
    controller:setOption(9, 2) -- ALARM_STATE = RED
end

trigger.action.outText("AAA/SAM threats in " .. area .. " activated!", 10)

end

function deactivateLatn(area) for groupName, group in pairs(latn_areas[area]) do local controller = Group.getByName(groupName):getController() controller:setOption(0, 4) -- ROE = WEAPON HOLD controller:setOnOff(false) end

trigger.action.outText("AAA/SAM threats in " .. area .. " deactivated.", 10)

end

DTomas15 commented 1 week ago

Duplicate. Won't fix Moved and grouped for issue branch. Will be solved with #2