Mmm, yeah I get what you say. That mission is the result of multiple test iterations, so it's bound to be somewhat confusing.
After a few attempts I just lost the will to keep the code neat.
I'm missing your point on the use of when on the first 4 sexps, IIRC those where the sexps that issue the orders to the transport. I cannot use an every-time there, the transport will just stop responding if I spam it with orders endlessly.
About the concept of the mission itself:
3 ships.
2 of them staying still.
1 of them switching to dock on the first on one, then undocking and moving to dock on the second one. Repeat last step in an endless loop.
Thanks maslo, I don't have fred right here, but from what I could understand checking the mission on notepad your example will not work for what I want to achieve. It's just docking endlessly with a single ship, I want to use both.