Needs help with dockable drone's behavior

Hi, I need help to change the drone (POD) behavior so that:
1 > drone will undock and then attack the targeted area obtained by [Drone control tower] target painter weapon
2 > sync target with the tower's target painter
3 > return to its previous job if available (like go back to assisting factory)

I spent at least 4 hours trying to accomplish that on Global Commanders AEON's Flying beauty drones behavior but no result.

Thanks for your help

@bluesaka111

well, doing this in 4 hours is likely not possible.

Just as example:
Black ops Unleashed is adding drones to the Tempest (Aeon naval experimental)

To do so, we created a new unit class named AirDroneCarrier
https://github.com/Uveso/BlackOpsFAF-Unleashed/blob/master/hook/units/UAS0401/UAS0401_script.lua#L10

To initialize the drones and set a target we call from the tempest unitscript:
AirDroneCarrier.InitDrones(self)
AirDroneCarrier.SetAttacker(self, instigator)

The new AirDroneCarrier class is defined here:
https://github.com/Uveso/BlackOpsFAF-Unleashed/blob/master/lua/BlackOpsunits.lua#L4

As you can see, the drone logic is done in over 500 lines of code.
Nothing you can do in 4 hours.

Yes, that what I based on, but the drones refuse to move away from the attach points. Interestingly, the drone selection border spin, indicate that the drone indeed receive the target and undocked but the AA weapon refuse to fire.

Maybe I will try again

Well, check the game.log for warnings / errors.

You could use a IssueMove() command to move the drone to the target.
This way you can see if undock etc. is working

Then check fire angle of drone weapons. Maybe they can't aim to the ground.