Here's a bonus round that rather spoils the game -
I lose the Enterprise during Mission 1. Later in the mission, I fail, and I'm kicked to a failure debrief screen. I hit 'replay mission'. I lose the Enterprise again, but I beat the mission and proceed in the campaign. What is the value of @destroyedCount going into Mission 2?
I think I know what you're getting at.. and I think I've run into that same problem.
@destroyedCount becomes 2, in that case right? (Because CVs are apparently saved when the debrief starts, regardless of anything else.) When it should be 1.
I got around it by using a temporary variable and then storing a PPV upon mission success and Alt-J pressed, iirc.