Lose game if all players dead/variable = 0

So, I’m working on a survival game on overwatch, but every way i try, using players, or variables, they don’t work. I atleast want one way or the other to work. Can someone please help?

use Is true for all then array All dead players and condition player variable(current array element, somvar) == some value

For example:

rule("Rule 1")
{
	event
	{
		Ongoing - Global;
	}

	conditions
	{
		Update Every Frame(Is True For All(All Dead Players(All Teams), Current Array Element.A == 1234)) == True;
	}

	actions
	{
		Declare Team Victory(All Teams);
	}
}

The Update Every Frame will ensure this condition will reevaluated every frame (aka server tick/60hz) because comparing some values in conditions, the workshop makes cache from that value in a span from specific moment, Update Every Frame will prevent from caching and use raw value.

The Current Array Element.A means, that Current Array Element is player we are testing, and A is variable name.

== 1234 is comparision used to test that value.

If all tests returns true, this rule will be executed and Declare team victory (or declare match end/draw/player victory) to end match.