forget all this scientific stuff, a simpler solution would be to set up a trigger activated by east to trigger the same ending.
So therefore you have 2 triggers, one testing for if all the guys are dead, and another in the area where they will flee. Once one orm more of the
soldiers runs away, it will trigger that same end. Both the triggers will do the same thing.
I will test this, if it works, then topic solved.