Dan109 -> RE: LUA Base support (6/10/2017 2:16:31 AM)
|
Try ScenEdit_HostUnitToParent. Here are the results from a test I did. Probably doesn't do what you want, to change base while deployed and not 'teleport' to the new base. Maybe there should be a bool flag on this SE function, to physically move it or not. >> my_unit = ScenEdit_GetUnit({name='Green Pawn #1', guid='49bb27a4-7107-4a95-9402-8d5f05d432f7'}) print(my_unit) ScenEdit_HostUnitToParent({HostedUnitNameOrID='Green Pawn #1',SelectedHostNameOrID='CVN 77 George Bush [Nimitz Class]'}) print(my_unit) unit { type = 'Aircraft', subtype = '8201', name = 'Green Pawn #1', side = 'US Navy', guid = '49bb27a4-7107-4a95-9402-8d5f05d432f7', proficiency = 'Regular', latitude = '26.1435543761475', longitude = '-80.0242708081714', altitude = '0', speed = '46.66667', throttle = 'Loiter', autodetectable = 'False', base = 'LCS 17 Indianapolis [Freedom LCS]', mounts = '0', magazines = '0', unitstate = 'Unassigned', fuelstate = 'None', weaponstate = 'None', } unit { type = 'Aircraft', subtype = '8201', name = 'Green Pawn #1', side = 'US Navy', guid = '49bb27a4-7107-4a95-9402-8d5f05d432f7', proficiency = 'Regular', latitude = '26.2126470332819', longitude = '-79.8800780252283', altitude = '0', speed = '46.66667', throttle = 'Loiter', autodetectable = 'False', base = 'CVN 77 George Bush [Nimitz Class]', mounts = '0', magazines = '0', unitstate = 'Unassigned', fuelstate = 'None', weaponstate = 'None', } Results from the UI, the aircraft was 'teleported' from the LCS to the CV, which is not very applicable during a scenario execution
|
|
|
|