Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

Moving Aircraft Around on the Ground

 
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 >> Moving Aircraft Around on the Ground Page: [1]
Login
Message << Older Topic   Newer Topic >>
Moving Aircraft Around on the Ground - 9/21/2020 3:51:07 PM   
SeaQueen


Posts: 1451
Joined: 4/14/2007
From: Washington D.C.
Status: offline
Is there a way in LUA to periodically reposition aircraft on the ground? In order to make a strike problem harder, I'd like to "reshuffle the deck," now and then.
Post #: 1
RE: Moving Aircraft Around on the Ground - 9/21/2020 8:50:34 PM   
Durendal28

 

Posts: 6
Joined: 4/22/2020
Status: offline
You could use the ScenEdit_HostUnitToParent function to move aircraft to hangers, parking spaces, etc.

(in reply to SeaQueen)
Post #: 2
RE: Moving Aircraft Around on the Ground - 9/21/2020 9:06:29 PM   
michaelm75au


Posts: 13500
Joined: 5/5/2001
From: Melbourne, Australia
Status: offline
Use unit.base to set the aircraft to a different 'facility' such as below

local base = ScenEdit_GetUnit( { name='Airfield', side='NATO' })
local facilities = base.group.unitlist -- list of facilities at base
local x = math.random(1,#facilities )
u = ScenEdit_GetUnit({ name = facilities[x]})
unit.base = u

You would filter the 'facilities' list to only include items that can host the aircraft; like a 'control tower' shouldn't be counted. Or leave them in, and skip assigning the aircraft to it - let it stay at the original location.
[This is just scripted without any checking as to practicality as not running Command at the moment. I sure others can give you a more precise example.]

_____________________________

Michael

(in reply to SeaQueen)
Post #: 3
Page:   [1]
All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Mods and Scenarios >> Lua Legion >> Moving Aircraft Around on the Ground 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

0.578