While playtesting DoS on WA's fourth disorder mission, I ran into a weird bug. At the beginning of the mission, I successfully accomplished both timed objectives (rushed the Webway Assembly and killed it before it could teleport away, then took out the Land Raider before it got past the first gate), so I began taking my time clearing out the map. I finished clearing out the Chaos side and camped the critical location with my army, but didn't capture it. Then I switched to the orks and began pushing there as well. Except as I'm about to finish up the location the Webway Assembly would've teleported to at the start, I suddenly get switched back to Chaos and cannot switch back, nor do I get any "objective failed" cues.
Then as I push at the gate, the instant the Farseer dies, I get a SCAR crash. Log says the crash was triggered by the Rule_Objective_Kill_The_Farseer section, which force-switches back to Chaos and removes the button to switch back to the Orks. As I look back at the Ork base, I see no base and a single Vyper where the Ork base used to be. So I'm guessing what happened is that the Vyper killed the Ork HQ without me noticing (as the script that checks if the HQ is alive does not give the "objective failed" cue if it's dead, it just throws back to Chaos without warning), which caused the game to remove the faction switch button as proper. But when Taldeer is killed, the game tries removing the button again but since it's already been removed, null pointer exception. To test this, I commented out the button removal in the Rule_Objective_Kill_The_Farseer section - and indeed, the SCAR crash goes away and I can move Crull to the objective to finish the mission.
How in the world did this get past Relic's playtesting? I know enemy attacks on this mission are nowhere near heavy enough to overrun the player's bases, even on Insanity, but still. So then, question. If I were to include in the script a boolean variable that gets set to true if the button has already been removed and I check its value before doing any removing, is the variable's value preserved when the game (auto)saves?
Edited by FraktalTMG, 24 February 2019 - 11:08 PM.