Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

Configuring High Value Air Asset Attack Missions

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Mods and Scenarios >> Lua Legion >> Configuring High Value Air Asset Attack Missions Page: [1]
Login
Message << Older Topic   Newer Topic >>
Configuring High Value Air Asset Attack Missions - 9/2/2021 12:43:08 AM   
SeaQueen


Posts: 1451
Joined: 4/14/2007
From: Washington D.C.
Status: offline
Sometimes you want to create a mission to attack high value aircraft might not be airborne at the scenario start. For example, you might want to set a 4 ship of fighters on strip alert (or maybe airborn) to strike AWACS, tanker, and electronic warfare aircraft. There's not an obvious way to get aircraft of a particular type on the target list of a mission, so I created this LUA script, which is intended to be run in the console, to help you configure your missions.

-- to run in LUA console

-- select enemy bases to look for aircraft on the ground
enemyBaseId= {name='Al Asad Airbase', guid='GWKW9V-0HM9314L9UDIG'}
enemyBase = ScenEdit_GetUnit(enemyBaseId)

-- determine targeted aircraft types
enemyBaseAircraft = enemyBase["embarkedUnits"].Aircraft
targetAircraftTypes = {[214] = true, [343] = true, [617] = true, [1984] = true,[2045] = true}  -- KC-10, EA-18G, KC-135, E-3B, RC-135W

-- build target list
targetAircraft = {}
k=1
for i, j in ipairs(enemyBaseAircraft) do
    acft = ScenEdit_GetUnit({guid=j})
    if ( targetAircraftTypes[acft.dbid] ) then
        targetAircraft[k] = j
        k=k+1
    end
end

print(targetAircraft)

msnName = "OCA - HVAA-A"
msnTgts = {targetlist = targetAircraft}
ScenEdit_AssignUnitAsTarget(targetAircraft, msnName)

Post #: 1
RE: Configuring High Value Air Asset Attack Missions - 9/2/2021 6:52:35 PM   
hrfepo1

 

Posts: 108
Joined: 9/19/2017
Status: offline
Thanks!

_____________________________


(in reply to SeaQueen)
Post #: 2
Page:   [1]
All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Mods and Scenarios >> Lua Legion >> Configuring High Value Air Asset Attack Missions Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

2.469