Victory on Team Kill condition

I’m trying to make a condition outside of elimination mode where a team is able to claim round victory if they are able to cause a teamkill. I have two separate rules for this. One to check for each team.

My issue right now is that rounds are instantly ending during setup. I have a feeling it’s one of three rules causing the issue but I’m not sure which one:

rule("Permadeath")
{
	event
	{
		Ongoing - Global;
	}

	conditions
	{
		All Players(All Teams) == True;
	}

	actions
	{
		Disable Built-In Game Mode Respawning(All Players(All Teams));
	}
}

rule("Team Kill Victory Condition Team 1")
{
	event
	{
		Ongoing - Global;
	}

	conditions
	{
		All Players(Team 2) == All Dead Players(Team 2);
	}

	actions
	{
		Abort If(Is Between Rounds);
		Declare Round Victory(Team 1);
		End;
	}
}

rule("Team Kill Victory Condition Team 2")
{
	event
	{
		Ongoing - Global;
	}

	conditions
	{
		All Players(Team 1) == All Dead Players(Team 1);
	}

	actions
	{
		Abort If(Is Between Rounds);
		Declare Round Victory(Team 2);
		End;
	}
}

Based on the fact it always seems to give Team 1 the victory, and the rule for Team 1’s victory condition appears first in the script, I’m willing to bet it’s the Team Kill Victory Condition rules causing the issue, but I can’t find a good way to stop it from happening.

make “number of living players:opposite team of:team of:event player==0” and then “declare round/team victory:team of:event player”

So essentially I can scrap both of the current team kill victory conditions for just that one?

This condition does nothing.

You can fix this by adding the conditions:

is true for any(all players(team 1), has spawned(current array element)) == true

(replace team 1 with team 2 in the second rule of course)