Also the "undocked" part the event could be a little dangerous. I assume you are doing something similar to the walkthrough (transports capturing the ship). What if a transport is destroyed before it is undocked, but after the ship is taken over?
Then mission failure, the goal is to have the Omega and Rasputin dock, transfer cargo, undock and depart. However the enemy fighters goals are to disable Omega and destroy Rasputin and there are several different outcomes. One of the outcomes involves this directive:
Option 1: Complete success
Option 2: Omega is destroyed before transfer of cargo: Failure
Option 3: Omega is destroyed after transfer of cargo: meh success
Option 4: Omega is disabled after transfer of cargo. The incoming enemy frieghter then docks with Omega and Omega iff changes to hostile. directive should show up "destroy omega" only in this situation: meh success
Option 5: Omega is disabled before transfer of cargo. The Rasputin still attempts to dock with it and the enemy frieghter warps in and heads towards the Omega to capture it. If the frieghter gets there first and captures the Omega before the transfer of cargo could take place: Failure
Option 6: Omega is disabled before transfer of cargo. The Rasputin still attempts to dock with it and the enemy frieghter warps in and heads towards the Omega to capture it. If the Rasputin undocks with Omega and departs with the cargo: success - the directive should also appear in this situation because the cargo had been transfered and the Omegas iff changes.
The overall mission goal is to make sure Rasputin departs the system with the cargo the Omega starts out wit. The Omega could die or be captured after the transfer of cargo and it wouldn't matter, it just wouldn't be the best debriefing. However due to the story line and fun I want this directive to be there.