moggy2 wrote:you can only have 2 ship commands running at a time.
Two "Auxiliary". Aren't they slots 10 and 11? And then the Primary command in slot 0. For these three slots one can stop the running command by selecting an another command (or 'None') in the same slot. This is what you normally do.
Ships do have other slots too, but one would need a helper command to list/start/stop scripts on them. Such helper is not trivial, I guess. (Active SE does show running scripts in ship details, but that is read-only.) Some primary commands do run background helper scripts in those unlisted slots already.
It is that GMS command in auxiliary slot that starts the "Attack all enemies" (and refuels when docked). One could stop it on the Lead (transport). But that might break some logical invariables at some point.
Watching combat with sector map open:
* lead of formation is hit -> whole formation flashes red
* escort is hit -> that escort and lead flash red
From that one might assume that SIGNAL_ATTACKED from leader is broadcasted to whole formation, but SIGNAL_ATTACKED from other member is merely unicasted to the leader. And I'm not at all certain about the latter. If it does, and the leader reacts, then its attack on the foe might cause retaliation against the leader, which would call in the rest of the formation. But transport lead probably does not react, and even if it does, by the time the formation reacts, the assaulted member is probably long gone.
And if we are talking OOS, that M4 probably dies from the first hit.