Get home base of unit
Posted: Wed Aug 14, 2019 12:38 am
I thought this would be easy but I can't get the base of a unit using lua (trying to use it on an AC that does have a home base set).
if i print:
u.base
I get the info in the lua wrapper - not a value for the base but all the values for the different items - just the same as if I printed just u.
if I do: u.hostFacility
I get nil
If I print u.fields I see:
property_16 = '.base , LuaWrapper_ActiveUnit , True'
sort of the same for hostFacility, in the field list it shows:
property_49 = '.hostFacility , LuaWrapper_Facility , False'
If I just do print(u) it shows:
base = 'NS Blue Fields',
but u.base returns the same thing as just u - all the things - not just u.base.
if i print:
u.base
I get the info in the lua wrapper - not a value for the base but all the values for the different items - just the same as if I printed just u.
if I do: u.hostFacility
I get nil
If I print u.fields I see:
property_16 = '.base , LuaWrapper_ActiveUnit , True'
sort of the same for hostFacility, in the field list it shows:
property_49 = '.hostFacility , LuaWrapper_Facility , False'
If I just do print(u) it shows:
base = 'NS Blue Fields',
but u.base returns the same thing as just u - all the things - not just u.base.