How to make a Hero based victory/defeat trigger

I need help with making a hero based victory/defeat trigger that works for a mod that is effective on all players including computers

Basically I need a trigger for a mod that is as simple as possible for creating the victory/defeat condition of when 3 different hero’s die for each race Protoss “Artanis” Terran “Raynor” Zerg “Kerrigan”

Every other lesser hero is killable except these three

When one playing said race has their hero killed it is an instant defeat but when the surviving race kills another hero be it computer based or player based it is an instant win " for a 1v1 for example "

If anyone can help me figure out the variables I need and the trigger settings that are step by step with pictures I would greatly appreciate it I’m new to triggers in the editor and I could use the help

I would define 3 variables and make 2 triggers.
Variables:

  • terran defeated = False
  • protoss defeated = False
  • zerg defeated = False

Triggers:

That’s what came to my mind. Untested.
Possible flaws:

  • “effective on all players” didn’t mean all players from a race are defeated from any of them losing it’s hero.
  • “Active players” in my triggers would not include the computers (could probably just use “All Players” in that case, not like so little can cause lag)
  • I screwed up something else.
1 Like

Thank you for your help