Closed ceacar closed 5 years ago
you are trying to lift and land at the same frame when a factory is ready. a landed factory does not have the ability land you have to lift, and then check for flying factory in the next frame. then make it land
thanks lot; i m posting my code below in case anybody need it
async def relocate_building_for_addon(self, building_type:'UnitTypeId.BARRACKS', flying_building_type:'UnitTypeId.BARRACKSFLYING'):
for unit in self.units(building_type).ready:
if unit.add_on_tag == 0:
await self.do(unit(AbilityId.LIFT))
for unit in self.units(flying_building_type).ready:
await self.do(unit(AbilityId.LAND, unit.add_on_land_position))
await asyncio.sleep(5)
I wrote some code below, doesn't work well
does any one have a solution