about 5 years ago - DanReed-11233 - Direct link

The easiest way to ensure one Zenyatta is to not allow Zenyatta in the Settings and then use the “Start Forcing Player To Be Hero” Action on a random player. (To choose a random player, try “Random Value In Array” of “All Players” of “Team 1/2”.)

If you want players to be able to choose Zenyatta, but only one per team, BUT you also don’t want hero limits on the other players, then it’s a bit more complicated. You could try an “Ongoing - Each Player” Event where the Player is limited to “Zenyatta”, with no condition, with a “Set Allowed Heroes” action that sets the allowed players for everyone else. By “everyone else”, I mean Remove From Array(All Players(Team 1/2), Event Player) which means it’s everyone except the Zenyatta who will be setting their allowed heroes. This rule would make it so that as soon as someone picks Zenyatta, then no one else can.

The winning condition is much simpler. Just add an “Ongoing - Each Player” Event where the Team is the attacking team, the Player is Zenyatta, and the first condition is Distance Between(Objective Position(0/1/2), Event Player) < 10. Then the action is simply “Declare Team Victory” for whichever team should win.

For the losing condition, just listen for a Player Died event where the player is Zenyatta. You can either “Declare Team Victory” for the other team, or you could do something like respawn the attackers, award points, etc.