Return to post
- variables
- {
- global:
- 0: ActivePlayers
- 1: Spectators
- 5: Time1
- 10: Tier2Spectators
- 11: Tier2ActivePlayers
- 12: Tier1Index
- 13: Tier2Index
- 14: DuplicateRemovalIndex
- 15: TestArray
- 16: Time2
- 17: Tier1TimeStart
- 18: Tier2TimeStart
- player:
- 0: Active
- 2: GameCameraPosition
- 5: YourOponent
- 9: FightStarted
- 11: SpectatorLocationNumber
- 12: DontAllowChangeLocation
- 13: SpectatorLocation
- 14: GuiVisible
- 15: QueueText
- 16: Time
17: BattleHub
- 17: BattleHud
- 18: ChangeHeroesVisible
- 19: ChangeHeroesSelection
- 20: ChangeHeroes
- 21: RReleased
- 23: NotInQueue
- 24: BattleQueueRemovalText
- 25: SpectatorQueueRemovalText
- 26: FReleased
- }
- rule("Start settings")
- {
- event
- {
- Ongoing - Global;
- }
- conditions
- {
- Is Game In Progress == True;
- }
- actions
- {
- Global.ActivePlayers = Empty Array;
- Disable Built-In Game Mode Scoring;
- Global.Z = Empty Array;
- Global.Time1 = 60;
- Global.Time2 = 60;
- Global.ActivePlayers = Empty Array;
- Global.Spectators = Empty Array;
- Global.Tier2Spectators = Empty Array;
- Global.Tier2ActivePlayers = Empty Array;
- Pause Match Time;
- Create Dummy Bot(Hero(Genji), All Teams, 2, Vector(0, 0, 0), Vector(0, 0, 0));
- Create Dummy Bot(Hero(Genji), All Teams, 3, Vector(0, 0, 0), Vector(0, 0, 0));
- Create Dummy Bot(Hero(Genji), All Teams, 4, Vector(0, 0, 0), Vector(0, 0, 0));
- }
- }
- rule("Start player settings")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
- Has Spawned(Event Player) == True;
- }
- actions
- {
- Event Player.SpectatorLocation = Vector(-240, -80, 0.200);
- Event Player.SpectatorLocationNumber = 1;
- Event Player.ChangeHeroesVisible = False;
- Event Player.ChangeHeroesSelection = 1;
- Event Player.NotInQueue = False;
- Event Player.BattleQueueRemovalText = Custom String("Press F to remove yourself from queue if you want to change heroes or afk");
- Event Player.SpectatorQueueRemovalText = Custom String("Press F to remove yourself from queue");
- }
- }
- rule("")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- }
- rule("##CAMERA AND MOVEMENT##")
- {
- event
- {
- Ongoing - Global;
- }
- }
- rule("Start camera")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
- Event Player.Active == True;
- }
- actions
- {
- Start Camera(Event Player, Event Player.GameCameraPosition, Eye Position(Event Player), 20);
- }
- }
- rule("Camera position")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
- Event Player.Active == True;
- }
- actions
- {
- Event Player.GameCameraPosition = Vector(X Component Of(Position Of(Event Player)) + -7, Y Component Of(Position Of(Event Player))
- + 1, Z Component Of(Position Of(Event Player)));
- Wait(0.016, Ignore Condition);
- Loop If Condition Is True;
- }
- }
- rule("Turn Left")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
- Event Player.Active == True;
- (Z Component Of(Position Of(Event Player)) > Z Component Of(Position Of(Event Player.YourOponent))) == True;
- }
- actions
- {
- Start Facing(Event Player, Vector(0, 0, -180), 10000, To World, Direction and Turn Rate);
- Wait(0.500, Ignore Condition);
- Loop If Condition Is True;
- }
- }
- rule("Turn Right")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
- Event Player.Active == True;
- (Z Component Of(Position Of(Event Player)) < Z Component Of(Position Of(Event Player.YourOponent))) == True;
- }
- actions
- {
- Start Facing(Event Player, Vector(0, 0, 180), 10000, To World, Direction and Turn Rate);
- Wait(0.500, Ignore Condition);
- Loop If Condition Is True;
- }
- }
- rule("Movement")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
- Event Player.Active == True;
- }
- actions
- {
- Start Transforming Throttle(Event Player, 90, 90, Event Player);
- Start Forcing Throttle(Event Player, 0, 1, 0, 1, 0, 0);
- }
- }
- rule("Start Forcing X tier 1 position")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
- Event Player.Active == True;
- (X Component Of(Position Of(Event Player)) < -221.100 || X Component Of(Position Of(Event Player)) > -220.900) == True;
- Event Player.FightStarted == True;
- Array Contains(Global.ActivePlayers, Event Player) == True;
- }
- actions
- {
- Wait(0.100, Ignore Condition);
- Start Forcing Player Position(Event Player, Vector(-221, Y Component Of(Position Of(Event Player)), Z Component Of(Position Of(
- Event Player))), True);
- Wait(0.250, Abort When False);
- Loop If Condition Is True;
- }
- }
- rule("Stop Forcing X tier 1 position")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
- Event Player.Active == True;
- X Component Of(Position Of(Event Player)) == -221;
- Event Player.FightStarted == True;
- Array Contains(Global.ActivePlayers, Event Player) == True;
- }
- actions
- {
- Stop Forcing Player Position(Event Player);
- }
- }
- rule("Start Forcing X tier 2 position")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
- Event Player.Active == True;
- (X Component Of(Position Of(Event Player)) < -159.100 || X Component Of(Position Of(Event Player)) > -158.900) == True;
- Event Player.FightStarted == True;
- Array Contains(Global.Tier2ActivePlayers, Event Player) == True;
- }
- actions
- {
- Wait(0.100, Ignore Condition);
- Start Forcing Player Position(Event Player, Vector(-159, Y Component Of(Position Of(Event Player)), Z Component Of(Position Of(
- Event Player))), True);
- Wait(0.250, Abort When False);
- Loop If Condition Is True;
- }
- }
- rule("Stop Forcing X tier 2 position")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
- Event Player.Active == True;
- X Component Of(Position Of(Event Player)) == -159;
- Event Player.FightStarted == True;
- Array Contains(Global.Tier2ActivePlayers, Event Player) == True;
- }
- actions
- {
- Stop Forcing Player Position(Event Player);
- }
- }
- rule("")
- {
- event
- {
- Ongoing - Global;
- }
- }
- rule("##COMBAT RULES##")
- {
- event
- {
- Ongoing - Global;
- }
- }
- rule("Knockback")
- {
- event
- {
- Player Dealt Damage;
- All;
- All;
- }
- actions
- {
- If(Z Component Of(Position Of(Victim)) < Z Component Of(Position Of(Event Player)));
- Apply Impulse(Victim, Vector(0, 1.100, -1), 5, To World, Cancel Contrary Motion);
- Else;
- Apply Impulse(Victim, Vector(0, 1.100, 1), 5, To World, Cancel Contrary Motion);
- End;
- }
- }
- rule("Genji Ult")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
- Event Player.FightStarted == True;
- Hero(Genji) == True;
- }
- actions
- {
- Set Ultimate Charge(Event Player, Ultimate Charge Percent(Event Player) + 3);
- Wait(1, Ignore Condition);
- Loop If Condition Is True;
- }
- }
- rule("")
- {
- event
- {
- Ongoing - Global;
- }
- }
- rule("#SPECTATOR MODE#")
- {
- event
- {
- Ongoing - Global;
- }
- }
- rule("Spectator mode")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
- Has Spawned(Event Player) == True;
- Event Player.Active == False;
- Is Game In Progress == True;
- }
- actions
- {
- Event Player.FightStarted = False;
- Set Invisible(Event Player, All);
- Stop Camera(Event Player);
- Stop Forcing Player Position(Event Player);
- Set Primary Fire Enabled(Event Player, False);
- Set Secondary Fire Enabled(Event Player, False);
- Set Melee Enabled(Event Player, False);
- Set Ability 1 Enabled(Event Player, False);
- Set Ability 2 Enabled(Event Player, False);
- Set Ultimate Ability Enabled(Event Player, False);
- Respawn(Event Player);
- Stop Facing(Event Player);
- Start Forcing Player Position(Event Player, Event Player.SpectatorLocation, True);
- }
- }
- rule("Change spectator location")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
- Event Player.Active == False;
- Is Button Held(Event Player, Primary Fire) == True;
- Event Player.ChangeHeroes == False;
- }
- actions
- {
- If(Event Player.SpectatorLocationNumber == 0 && Event Player.DontAllowChangeLocation == False);
- Event Player.SpectatorLocationNumber = 1;
- Event Player.DontAllowChangeLocation = True;
- Event Player.SpectatorLocation = Vector(-240, -80, 0.200);
- End;
- If(Event Player.SpectatorLocationNumber == 1 && Event Player.DontAllowChangeLocation == False);
- Event Player.SpectatorLocationNumber = 0;
- Event Player.DontAllowChangeLocation = True;
- Event Player.SpectatorLocation = Vector(-183, -80, 0.600);
- End;
- }
- }
- rule("Allow to change locations")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
- Event Player.Active == False;
- Event Player.DontAllowChangeLocation == True;
- Is Button Held(Event Player, Primary Fire) == False;
- }
- actions
- {
- Event Player.DontAllowChangeLocation = False;
- }
- }
- rule("Force Spectator positions")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
- Has Spawned(Event Player) == True;
- Event Player.Active == False;
- Is Game In Progress == True;
- }
- actions
- {
- Wait(2, Abort When False);
- Start Forcing Player Position(Event Player, Event Player.SpectatorLocation, True);
- Loop If Condition Is True;
- }
- }
- rule("")
- {
- event
- {
- Ongoing - Global;
- }
- actions
- {
- Big Message(Null, Custom String("Made by Mikapo"));
- }
- }
- rule("##GAME ENGINE##")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- }
- rule("Check who are you against")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
- Event Player.Active == True;
- }
- actions
- {
- If(Array Contains(Global.ActivePlayers, Event Player) == True);
- If(Global.ActivePlayers[0] != Event Player);
- Event Player.YourOponent = Global.ActivePlayers[0];
- Else;
- Event Player.YourOponent = Global.ActivePlayers[1];
- End;
- End;
- If(Array Contains(Global.Tier2ActivePlayers, Event Player) == True);
- If(Global.Tier2ActivePlayers[0] != Event Player);
- Event Player.YourOponent = Global.Tier2ActivePlayers[0];
- Else;
- Event Player.YourOponent = Global.Tier2ActivePlayers[1];
- End;
- End;
- Wait(2, Ignore Condition);
- Loop;
- }
- }
- rule("if there is less than 4 players")
- {
- event
- {
- Ongoing - Global;
- }
- conditions
- {
Count Of(All Players(All Teams)) < 4;
- (Count Of(All Players(All Teams)) < 4 || (Count Of(Global.Tier2ActivePlayers) == 0 && Count Of(Global.Tier2Spectators)
- == 1 && Count Of(Global.ActivePlayers) == 0 && Count Of(Global.Spectators) == 1)) == True;
- }
- actions
- {
- While(Global.Tier2Spectators != Empty Array);
- If(Score Of(Global.Tier2Spectators[0]) < 9);
- Modify Player Score(Global.Tier2Spectators[0], 1);
- End;
- Modify Global Variable(Spectators, Append To Array, Global.Tier2Spectators[0]);
- Modify Global Variable(Tier2Spectators, Remove From Array By Index, 0);
- End;
- Wait(4, Ignore Condition);
- Loop If Condition Is True;
- }
- }
- rule("Tier 1 arena start")
- {
- event
- {
- Ongoing - Global;
- }
- conditions
- {
- Count Of(Global.ActivePlayers) == 0;
- Count Of(Global.Spectators) >= 2;
- Is Game In Progress == True;
- }
- actions
- {
- Wait(1, Abort When False);
- Global.Tier1TimeStart = False;
- Global.Time1 = 60;
- While(Count Of(Global.ActivePlayers) < 2);
- Modify Global Variable(ActivePlayers, Append To Array, Global.Spectators[0]);
- Modify Global Variable(Spectators, Remove From Array By Index, 0);
- End;
- For Global Variable(Tier1Index, 0, Count Of(Global.ActivePlayers), 1);
- Global.ActivePlayers[Global.Tier1Index].Active = True;
- Global.ActivePlayers[Global.Tier1Index].FightStarted = False;
- Set Invisible(Global.ActivePlayers[Global.Tier1Index], None);
- Stop Forcing Player Position(Global.ActivePlayers[Global.Tier1Index]);
- If(Global.Tier1Index == 0);
- Start Forcing Player Position(Global.ActivePlayers[Global.Tier1Index], Vector(-221, -88.100, 7.523), True);
- End;
- If(Global.Tier1Index == 1);
- Start Forcing Player Position(Global.ActivePlayers[Global.Tier1Index], Vector(-221, -88.100, -7.544), True);
- End;
- End;
- Wait(1, Ignore Condition);
- Big Message(Global.ActivePlayers, Custom String("Ready"));
- Wait(2, Ignore Condition);
- Big Message(Global.ActivePlayers, Custom String("Fight!"));
- Play Effect(Global.ActivePlayers[0], Buff Impact Sound, White, Position Of(Global.ActivePlayers[0]), 100);
- Play Effect(Global.ActivePlayers[1], Buff Impact Sound, White, Position Of(Global.ActivePlayers[1]), 100);
- For Global Variable(Tier1Index, 0, Count Of(Global.ActivePlayers), 1);
- Heal(Global.ActivePlayers[Global.Tier1Index], Null, 1000);
- Set Ultimate Charge(Global.ActivePlayers[Global.Tier1Index], 0);
- Stop Forcing Player Position(Global.ActivePlayers[Global.Tier1Index]);
- Global.ActivePlayers[Global.Tier1Index].FightStarted = True;
- Wait(0.100, Ignore Condition);
- Apply Impulse(Global.ActivePlayers[Global.Tier1Index], Vector(0, -1, 0), 5, To World, Cancel Contrary Motion);
- Set Melee Enabled(Global.ActivePlayers[Global.Tier1Index], True);
- Set Primary Fire Enabled(Global.ActivePlayers[Global.Tier1Index], True);
- Set Secondary Fire Enabled(Global.ActivePlayers[Global.Tier1Index], True);
- Set Ability 1 Enabled(Global.ActivePlayers[Global.Tier1Index], True);
- Set Ability 2 Enabled(Global.ActivePlayers[Global.Tier1Index], True);
- Set Ultimate Ability Enabled(Global.ActivePlayers[Global.Tier1Index], True);
- End;
- Global.Tier1TimeStart = True;
- }
- }
- rule("If Tier 1 player dies")
- {
- event
- {
- Player Died;
- All;
- All;
- }
- conditions
- {
- Array Contains(Global.ActivePlayers, Event Player) == True;
- Count Of(Global.ActivePlayers) == 2;
- }
- actions
- {
- Play Effect(All Players(All Teams), Bad Explosion, White, Event Player, 1);
- Play Effect(All Players(All Teams), Explosion Sound, White, Event Player, 80);
- If(Global.ActivePlayers[0] != Event Player);
- Big Message(Global.ActivePlayers, Custom String("{0} Wins!", Global.ActivePlayers[0]));
- Else;
- Big Message(Global.ActivePlayers, Custom String("{0} Wins!", Global.ActivePlayers[1]));
- End;
- Wait(2, Ignore Condition);
Modify Global Variable(Spectators, Append To Array, Event Player);
- If(Event Player.NotInQueue == False);
- Modify Global Variable(Spectators, Append To Array, Event Player);
- End;
- Modify Global Variable(ActivePlayers, Remove From Array By Value, Event Player);
- Respawn(Event Player);
- Event Player.Active = False;
- If(Count Of(All Players(All Teams)) >= 4);
Modify Global Variable(Tier2Spectators, Append To Array, Global.ActivePlayers[0]);
- If(Global.ActivePlayers[0].NotInQueue == False);
- Modify Global Variable(Tier2Spectators, Append To Array, Global.ActivePlayers[0]);
- End;
- Global.ActivePlayers[0].Active = False;
- Modify Global Variable(ActivePlayers, Remove From Array By Value, Global.ActivePlayers[0]);
- End;
- If(Count Of(All Players(All Teams)) < 4);
- Modify Player Score(Global.ActivePlayers[0], 1);
Global.Spectators = Array(Global.ActivePlayers[0], Global.Spectators[0], Global.Spectators[1], Global.Spectators[2],
Global.Spectators[3], Global.Spectators[4], Global.Spectators[5], Global.Spectators[6], Global.Spectators[7],
Global.Spectators[8], Global.Spectators[9], Global.Spectators[10], Global.Spectators[11]);
- If(Global.ActivePlayers[0].NotInQueue == False);
- Global.Spectators = Array(Global.ActivePlayers[0], Global.Spectators[0], Global.Spectators[1], Global.Spectators[2],
- Global.Spectators[3], Global.Spectators[4], Global.Spectators[5], Global.Spectators[6], Global.Spectators[7],
- Global.Spectators[8], Global.Spectators[9], Global.Spectators[10], Global.Spectators[11]);
- End;
- Modify Global Variable(Spectators, Remove From Array By Value, 0);
- Global.ActivePlayers[0].Active = False;
- Modify Global Variable(ActivePlayers, Remove From Array By Value, Global.ActivePlayers[0]);
- End;
- }
- }
- rule("Tier 2 arena start")
- {
- event
- {
- Ongoing - Global;
- }
- conditions
- {
- Count Of(Global.Tier2ActivePlayers) == 0;
- Count Of(Global.Tier2Spectators) >= 2;
- Count Of(All Players(All Teams)) >= 3;
- }
- actions
- {
- Wait(4, Abort When False);
- Global.Tier2TimeStart = False;
- Global.Time2 = 60;
- While(Count Of(Global.Tier2ActivePlayers) < 2);
- Modify Global Variable(Tier2ActivePlayers, Append To Array, Global.Tier2Spectators[0]);
- Modify Global Variable(Tier2Spectators, Remove From Array By Index, 0);
- End;
- For Global Variable(Tier2Index, 0, Count Of(Global.Tier2ActivePlayers), 1);
- Global.Tier2ActivePlayers[Global.Tier2Index].Active = True;
- Global.Tier2ActivePlayers[Global.Tier2Index].FightStarted = False;
- Set Invisible(Global.Tier2ActivePlayers[Global.Tier2Index], None);
- Stop Forcing Player Position(Global.Tier2ActivePlayers[Global.Tier2Index]);
- If(Global.Tier2Index == 0);
- Start Forcing Player Position(Global.Tier2ActivePlayers[Global.Tier2Index], Vector(-159, -88.500, 11.024), True);
- End;
- If(Global.Tier2Index == 1);
- Start Forcing Player Position(Global.Tier2ActivePlayers[Global.Tier2Index], Vector(-159, -88.500, -11.758), True);
- End;
- End;
- Wait(1, Ignore Condition);
- Big Message(Global.Tier2ActivePlayers, Custom String("Ready"));
- Wait(2, Ignore Condition);
- Big Message(Global.Tier2ActivePlayers, Custom String("Fight!"));
- For Global Variable(Tier2Index, 0, Count Of(Global.Tier2ActivePlayers), 1);
- Heal(Global.Tier2ActivePlayers[Global.Tier2Index], Null, 1000);
- Set Ultimate Charge(Global.Tier2ActivePlayers[Global.Tier2Index], 0);
- Stop Forcing Player Position(Global.Tier2Index[Global.Tier2Index]);
- Global.Tier2ActivePlayers[Global.Tier2Index].FightStarted = True;
- Wait(0.100, Ignore Condition);
- Apply Impulse(Global.ActivePlayers[Global.Tier1Index], Vector(0, -1, 0), 5, To World, Cancel Contrary Motion);
- Set Melee Enabled(Global.Tier2ActivePlayers[Global.Tier2Index], True);
- Set Primary Fire Enabled(Global.Tier2ActivePlayers[Global.Tier2Index], True);
- Set Secondary Fire Enabled(Global.Tier2ActivePlayers[Global.Tier2Index], True);
- Set Ability 1 Enabled(Global.Tier2ActivePlayers[Global.Tier2Index], True);
- Set Ability 2 Enabled(Global.Tier2ActivePlayers[Global.Tier2Index], True);
- Set Ultimate Ability Enabled(Global.Tier2ActivePlayers[Global.Tier2Index], True);
- End;
- Global.Tier2TimeStart = True;
- }
- }
- rule("If Tier 2 player dies")
- {
- event
- {
- Player Died;
- All;
- All;
- }
- conditions
- {
- Array Contains(Global.Tier2ActivePlayers, Event Player) == True;
- Count Of(Global.Tier2ActivePlayers) == 2;
- }
- actions
- {
- Play Effect(All Players(All Teams), Bad Explosion, White, Event Player, 1);
- Play Effect(All Players(All Teams), Explosion Sound, White, Event Player, 80);
- If(Global.Tier2ActivePlayers[0] != Event Player);
- Big Message(Global.Tier2ActivePlayers, Custom String("{0} Wins!", Global.Tier2ActivePlayers[0]));
- Else;
- Big Message(Global.Tier2ActivePlayers, Custom String("{0} Wins!", Global.Tier2ActivePlayers[1]));
- End;
- Wait(2, Ignore Condition);
Modify Global Variable(Spectators, Append To Array, Event Player);
- If(Event Player.NotInQueue == False);
- Modify Global Variable(Spectators, Append To Array, Event Player);
- End;
- Modify Global Variable(Tier2ActivePlayers, Remove From Array By Value, Event Player);
- Respawn(Event Player);
- Event Player.Active = False;
- If(Count Of(All Players(All Teams)) >= 4);
- Modify Player Score(Global.Tier2ActivePlayers[0], 1);
Global.Tier2Spectators = Array(Global.Tier2ActivePlayers[0], Global.Tier2Spectators[0], Global.Tier2Spectators[1],
Global.Tier2Spectators[2], Global.Tier2Spectators[3], Global.Tier2Spectators[4], Global.Tier2Spectators[5],
Global.Tier2Spectators[6], Global.Tier2Spectators[7], Global.Tier2Spectators[8], Global.Tier2Spectators[9],
Global.Tier2Spectators[10], Global.Tier2Spectators[11]);
- If(Global.ActivePlayers[0].NotInQueue == False);
- Global.Tier2Spectators = Array(Global.Tier2ActivePlayers[0], Global.Tier2Spectators[0], Global.Tier2Spectators[1],
- Global.Tier2Spectators[2], Global.Tier2Spectators[3], Global.Tier2Spectators[4], Global.Tier2Spectators[5],
- Global.Tier2Spectators[6], Global.Tier2Spectators[7], Global.Tier2Spectators[8], Global.Tier2Spectators[9],
- Global.Tier2Spectators[10], Global.Tier2Spectators[11]);
- End;
- Modify Global Variable(Tier2Spectators, Remove From Array By Value, 0);
- Global.Tier2ActivePlayers[0].Active = False;
- Modify Global Variable(Tier2ActivePlayers, Remove From Array By Index, 0);
- End;
- If(Count Of(All Players(All Teams)) < 4);
- Modify Player Score(Global.Tier2ActivePlayers[0], 1);
Global.Spectators = Array(Global.Tier2ActivePlayers[0], Global.Spectators[0], Global.Spectators[1], Global.Spectators[2],
Global.Spectators[3], Global.Spectators[4], Global.Spectators[5], Global.Spectators[6], Global.Spectators[7],
Global.Spectators[8], Global.Spectators[9], Global.Spectators[10], Global.Spectators[11]);
- If(Global.Tier2ActivePlayers[0].NotInQueue == False);
- Global.Spectators = Array(Global.Tier2ActivePlayers[0], Global.Spectators[0], Global.Spectators[1], Global.Spectators[2],
- Global.Spectators[3], Global.Spectators[4], Global.Spectators[5], Global.Spectators[6], Global.Spectators[7],
- Global.Spectators[8], Global.Spectators[9], Global.Spectators[10], Global.Spectators[11]);
- End;
- Modify Global Variable(Spectators, Remove From Array By Value, 0);
- Global.Tier2ActivePlayers[0].Active = False;
- Modify Global Variable(Tier2ActivePlayers, Remove From Array By Index, 0);
- End;
- }
- }
- rule("If player is alone in tier 1 duel")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
- Count Of(Global.ActivePlayers) == 1;
- Array Contains(Global.ActivePlayers, Event Player) == True;
- }
- actions
- {
- Wait(5, Abort When False);
- Big Message(Global.ActivePlayers, Custom String("Your oponent left"));
- Event Player.Active = False;
- Global.Spectators = Array(Event Player, Global.Spectators[0], Global.Spectators[1], Global.Spectators[2], Global.Spectators[3],
- Global.Spectators[4], Global.Spectators[5], Global.Spectators[6], Global.Spectators[7], Global.Spectators[8],
- Global.Spectators[9], Global.Spectators[10], Global.Spectators[11]);
- Modify Global Variable(Spectators, Remove From Array By Value, 0);
- Modify Global Variable(ActivePlayers, Remove From Array By Value, Event Player);
- }
- }
- rule("If player is alone in tier 2 duel")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
- Count Of(Global.Tier2ActivePlayers) == 1;
- Array Contains(Global.Tier2ActivePlayers, Event Player) == True;
- }
- actions
- {
- Wait(5, Abort When False);
- Big Message(Global.Tier2ActivePlayers, Custom String("Your oponent left"));
- Event Player.Active = False;
- Global.Tier2Spectators = Array(Event Player, Global.Tier2Spectators[0], Global.Tier2Spectators[1], Global.Tier2Spectators[2],
- Global.Tier2Spectators[3], Global.Tier2Spectators[4], Global.Tier2Spectators[5], Global.Tier2Spectators[6],
- Global.Tier2Spectators[7], Global.Tier2Spectators[8], Global.Tier2Spectators[9], Global.Tier2Spectators[10],
- Global.Tier2Spectators[11]);
- Modify Global Variable(Tier2Spectators, Remove From Array By Value, 0);
- Modify Global Variable(Tier2ActivePlayers, Remove From Array By Value, Event Player);
- }
- }
- rule("Tier 1 timer")
- {
- event
- {
- Ongoing - Global;
- }
- conditions
- {
- Count Of(Global.ActivePlayers) == 2;
- Global.Tier1TimeStart == True;
- }
- actions
- {
- Global.Time1 += -1;
- Wait(1, Ignore Condition);
- Loop If Condition Is True;
- }
- }
- rule("Tier 2 timer")
- {
- event
- {
- Ongoing - Global;
- }
- conditions
- {
- Count Of(Global.Tier2ActivePlayers) == 2;
- Global.Tier2TimeStart == True;
- }
- actions
- {
- Global.Time2 += -1;
- Wait(1, Ignore Condition);
- Loop If Condition Is True;
- }
- }
- rule("Tier 1 when time runs out")
- {
- event
- {
- Ongoing - Global;
- }
- conditions
- {
- Count Of(Global.ActivePlayers) == 2;
- Global.Time1 <= 0;
- }
- actions
- {
- If(Health(Global.ActivePlayers[0]) < Health(Global.ActivePlayers[1]));
- Kill(Global.ActivePlayers[0], Global.ActivePlayers[1]);
- Else If(Health(Global.ActivePlayers[0]) > Health(Global.ActivePlayers[1]));
- Kill(Global.ActivePlayers[1], Global.ActivePlayers[0]);
- Else;
- Big Message(Global.ActivePlayers, Custom String("DRAW!"));
- While(Count Of(Global.ActivePlayers) != 0);
- Modify Global Variable(Spectators, Append To Array, Global.ActivePlayers[0]);
- Global.ActivePlayers[0].Active = False;
- Modify Global Variable(ActivePlayers, Remove From Array By Index, 0);
- End;
- End;
- }
- }
- rule("Tier 2 when time runs out")
- {
- event
- {
- Ongoing - Global;
- }
- conditions
- {
- Count Of(Global.Tier2ActivePlayers) == 2;
- Global.Time2 <= 0;
- }
- actions
- {
- If(Health(Global.Tier2ActivePlayers[0]) < Health(Global.Tier2ActivePlayers[1]));
- Kill(Global.Tier2ActivePlayers[0], Global.Tier2ActivePlayers[1]);
- Else If(Health(Global.Tier2ActivePlayers[0]) > Health(Global.Tier2ActivePlayers[1]));
- Kill(Global.Tier2ActivePlayers[1], Global.Tier2ActivePlayers[0]);
- Else;
- Big Message(Global.Tier2ActivePlayers, Custom String("DRAW!"));
- While(Count Of(Global.Tier2ActivePlayers) != 0);
- Modify Global Variable(Spectators, Append To Array, Global.Tier2ActivePlayers[0]);
- Global.Tier2ActivePlayers[0].Active = False;
- Modify Global Variable(Tier2ActivePlayers, Remove From Array By Index, 0);
- End;
- End;
- }
- }
- rule("Remove 0 from the arrays")
- {
- event
- {
- Ongoing - Global;
- }
- conditions
- {
- Is Game In Progress == True;
- }
- actions
- {
- Modify Global Variable(ActivePlayers, Remove From Array By Value, 0);
- Modify Global Variable(Spectators, Remove From Array By Value, 0);
- Modify Global Variable(Tier2Spectators, Remove From Array By Value, 0);
- Modify Global Variable(Tier2ActivePlayers, Remove From Array By Value, 0);
- Wait(1, Ignore Condition);
- Loop If Condition Is True;
- }
- }
- rule("Remove duplicates from the arrays")
- {
- event
- {
- Ongoing - Global;
- }
- conditions
- {
- Is Game In Progress == True;
- }
- actions
- {
- For Global Variable(DuplicateRemovalIndex, 0, Count Of(Global.Spectators), 1);
- If(Array Contains(Global.ActivePlayers, Global.Spectators[Global.DuplicateRemovalIndex]) || Array Contains(Global.Tier2Spectators,
- Global.Spectators[Global.DuplicateRemovalIndex]) || Array Contains(Global.Tier2ActivePlayers,
- Global.Spectators[Global.DuplicateRemovalIndex]));
- Modify Global Variable(Spectators, Remove From Array By Index, Global.DuplicateRemovalIndex);
- End;
- End;
- For Global Variable(DuplicateRemovalIndex, 0, Count Of(Global.ActivePlayers), 1);
- If(Array Contains(Global.Spectators, Global.ActivePlayers[Global.DuplicateRemovalIndex]) || Array Contains(Global.Tier2Spectators,
- Global.ActivePlayers[Global.DuplicateRemovalIndex]) || Array Contains(Global.Tier2ActivePlayers,
- Global.ActivePlayers[Global.DuplicateRemovalIndex]));
- Modify Global Variable(ActivePlayers, Remove From Array By Index, Global.DuplicateRemovalIndex);
- End;
- End;
- For Global Variable(DuplicateRemovalIndex, 0, Count Of(Global.Tier2Spectators), 1);
- If(Array Contains(Global.Spectators, Global.Tier2Spectators[Global.DuplicateRemovalIndex]) || Array Contains(Global.ActivePlayers,
- Global.Tier2Spectators[Global.DuplicateRemovalIndex]) || Array Contains(Global.Tier2ActivePlayers,
- Global.Tier2Spectators[Global.DuplicateRemovalIndex]));
- Modify Global Variable(Tier2Spectators, Remove From Array By Index, Global.DuplicateRemovalIndex);
- End;
- End;
- For Global Variable(DuplicateRemovalIndex, 0, Count Of(Global.Tier2ActivePlayers), 1);
- If(Array Contains(Global.Spectators, Global.Tier2ActivePlayers[Global.DuplicateRemovalIndex]) || Array Contains(
- Global.ActivePlayers, Global.Tier2ActivePlayers[Global.DuplicateRemovalIndex]) || Array Contains(Global.Tier2Spectators,
- Global.Tier2ActivePlayers[Global.DuplicateRemovalIndex]));
- Modify Global Variable(Tier2ActivePlayers, Remove From Array By Index, Global.DuplicateRemovalIndex);
- End;
- End;
- Global.TestArray = Empty Array;
- For Global Variable(DuplicateRemovalIndex, 0, Count Of(Global.Spectators), 1);
- If(Array Contains(Global.TestArray, Global.Spectators[Global.DuplicateRemovalIndex]) == False);
- Modify Global Variable(TestArray, Append To Array, Global.Spectators[Global.DuplicateRemovalIndex]);
- Else;
- Modify Global Variable(Spectators, Remove From Array By Index, Global.DuplicateRemovalIndex);
- End;
- End;
- Global.TestArray = Empty Array;
- For Global Variable(DuplicateRemovalIndex, 0, Count Of(Global.ActivePlayers), 1);
- If(Array Contains(Global.TestArray, Global.ActivePlayers[Global.DuplicateRemovalIndex]) == False);
- Modify Global Variable(TestArray, Append To Array, Global.ActivePlayers[Global.DuplicateRemovalIndex]);
- Else;
- Modify Global Variable(ActivePlayers, Remove From Array By Index, Global.DuplicateRemovalIndex);
- End;
- End;
- Global.TestArray = Empty Array;
- For Global Variable(DuplicateRemovalIndex, 0, Count Of(Global.Tier2Spectators), 1);
- If(Array Contains(Global.TestArray, Global.Tier2Spectators[Global.DuplicateRemovalIndex]) == False);
- Modify Global Variable(TestArray, Append To Array, Global.Tier2Spectators[Global.DuplicateRemovalIndex]);
- Else;
- Modify Global Variable(Tier2Spectators, Remove From Array By Index, Global.DuplicateRemovalIndex);
- End;
- End;
- Global.TestArray = Empty Array;
- For Global Variable(DuplicateRemovalIndex, 0, Count Of(Global.Tier2ActivePlayers), 1);
- If(Array Contains(Global.TestArray, Global.Tier2ActivePlayers[Global.DuplicateRemovalIndex]) == False);
- Modify Global Variable(TestArray, Append To Array, Global.Tier2ActivePlayers[Global.DuplicateRemovalIndex]);
- Else;
- Modify Global Variable(Tier2ActivePlayers, Remove From Array By Index, Global.DuplicateRemovalIndex);
- End;
- End;
- Wait(5, Ignore Condition);
- Loop If Condition Is True;
- }
- }
- rule("")
- {
- event
- {
- Ongoing - Global;
- }
- }
- rule("##CODE FOR PEOPLE LEAVING OR JOINING##")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- }
- rule("Add player to spectators")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
- Is Game In Progress == True;
- Array Contains(Global.ActivePlayers, Event Player) == False;
- Array Contains(Global.Spectators, Event Player) == False;
- Array Contains(Global.Tier2Spectators, Event Player) == False;
- Array Contains(Global.Tier2ActivePlayers, Event Player) == False;
- Event Player == Has Spawned(Event Player);
- Event Player.NotInQueue == False;
- }
- actions
- {
Wait(3, Abort When False);
- Wait(1, Abort When False);
- Modify Global Variable(Spectators, Append To Array, Event Player);
- Loop If Condition Is True;
- }
- }
- rule("If player leaves")
- {
- event
- {
- Player Left Match;
- All;
- All;
- }
- conditions
- {
- Is Game In Progress == True;
- }
- actions
- {
- Modify Global Variable(ActivePlayers, Remove From Array By Value, Event Player);
- Modify Global Variable(Spectators, Remove From Array By Value, Event Player);
- Modify Global Variable(Tier2Spectators, Remove From Array By Value, Event Player);
- Modify Global Variable(Tier2ActivePlayers, Remove From Array By Value, Event Player);
- }
- }
- rule("")
- {
- event
- {
- Ongoing - Global;
- }
- }
rule("##HUB##")
- rule("##HUD##")
- {
- event
- {
- Ongoing - Global;
- }
- }
rule("Create player HUB")
- rule("Create global HUD")
- {
- event
- {
- Ongoing - Global;
- }
- actions
- {
- Create HUD Text(Filtered Array(All Players(All Teams), Current Array Element.GuiVisible == Current Array Element), Null,
- Custom String("Press left mouse to watch other arena"), Null, Left, 1, White, White, White, Visible To and String,
- Default Visibility);
- Create HUD Text(Filtered Array(All Players(All Teams), Current Array Element.GuiVisible == Current Array Element), Null,
- Custom String("Press R to change heroes"), Null, Left, 3, White, White, White, Visible To and String, Default Visibility);
- Create HUD Text(Filtered Array(All Players(All Teams), Current Array Element.ChangeHeroesVisible == Current Array Element), Null,
- Custom String("Press R to hide"), Null, Left, 0, White, White, White, Visible To and String, Default Visibility);
- Create HUD Text(Filtered Array(All Players(All Teams), Current Array Element.ChangeHeroesVisible == Current Array Element), Null,
- Custom String("Right mouse to change selection and Left mouse to pick hero"), Null, Left, 1, White, White, White,
- Visible To and String, Default Visibility);
- Create HUD Text(Filtered Array(All Players(All Teams), Current Array Element.ChangeHeroesVisible == Current Array Element),
- Custom String("CHANGE HEROES:"), Null, Null, Left, 2, Orange, White, White, Visible To and String, Default Visibility);
- Create HUD Text(All Players(All Teams), Null, Null, Custom String("{0} Made by: Mikapo {0}", Icon String(Fire)), Right, 0, White,
- White, Yellow, Visible To and String, Default Visibility);
- Create HUD Text(Filtered Array(All Players(All Teams),
- Current Array Element.ChangeHeroes && Current Array Element.ChangeHeroesSelection != 1), Custom String("{0} GENJI",
- Hero Icon String(Hero(Genji))), Null, Null, Left, 4, White, White, White, Visible To and String, Default Visibility);
- Create HUD Text(Filtered Array(All Players(All Teams),
- Current Array Element.ChangeHeroes && Current Array Element.ChangeHeroesSelection == 1), Custom String("{0} Genji",
- Hero Icon String(Hero(Genji))), Null, Null, Left, 4, Sky Blue, White, White, Visible To and String, Default Visibility);
- Create HUD Text(Filtered Array(All Players(All Teams),
- Current Array Element.ChangeHeroes && Current Array Element.ChangeHeroesSelection != 2), Custom String("{0} Hanzo",
- Hero Icon String(Hero(Hanzo))), Null, Null, Left, 5, White, White, White, Visible To and String, Default Visibility);
- Create HUD Text(Filtered Array(All Players(All Teams),
- Current Array Element.ChangeHeroes && Current Array Element.ChangeHeroesSelection == 2), Custom String("{0} Hanzo",
- Hero Icon String(Hero(Hanzo))), Null, Null, Left, 5, Sky Blue, White, White, Visible To and String, Default Visibility);
- Create HUD Text(Filtered Array(All Players(All Teams),
- Current Array Element.ChangeHeroes && Current Array Element.ChangeHeroesSelection != 3), Custom String("{0} Mei",
- Hero Icon String(Hero(Mei))), Null, Null, Left, 6, White, White, White, Visible To and String, Default Visibility);
- Create HUD Text(Filtered Array(All Players(All Teams),
- Current Array Element.ChangeHeroes && Current Array Element.ChangeHeroesSelection == 3), Custom String("{0} Mei",
- Hero Icon String(Hero(Mei))), Null, Null, Left, 6, Sky Blue, White, White, Visible To and String, Default Visibility);
- }
- }
- rule("Create player HUD")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- actions
- {
- Create HUD Text(Event Player.GuiVisible, Event Player.QueueText, Null, Null, Left, 0, White, White, White, Visible To and String,
- Default Visibility);
Create HUD Text(Event Player.GuiVisible, Null, Custom String("Press left mouse to watch other arena"), Null, Left, 1, White, White,
White, Visible To and String, Default Visibility);
- Create HUD Text(Event Player, Custom String("TIME: {0}", Event Player.Time), Null, Null, Top, 0, Red, White, White,
- Visible To and String, Default Visibility);
Create HUD Text(Event Player, Null, Null, Custom String("{0} Made by: Mikapo {0}", Icon String(Fire)), Right, 0, White, White,
Yellow, Visible To and String, Default Visibility);
Create HUD Text(Event Player.BattleHub, Custom String("Enemy Ultimate: {0}%", Ultimate Charge Percent(Event Player.YourOponent)),
- Create HUD Text(Event Player.BattleHud, Custom String("Enemy Ultimate: {0}%", Ultimate Charge Percent(Event Player.YourOponent)),
- Null, Null, Left, 0, Orange, White, White, Visible To and String, Default Visibility);
- Create HUD Text(Event Player.GuiVisible, Null, Event Player.SpectatorQueueRemovalText, Null, Left, 0, White, White, White,
- Visible To and String, Default Visibility);
- Create HUD Text(Event Player.BattleHud, Null, Event Player.BattleQueueRemovalText, Null, Left, 0, White, White, White,
- Visible To and String, Default Visibility);
- }
- }
rule("Spectator hub")
- rule("Spectator HUD")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
(Array Contains(Global.Spectators, Event Player) || Array Contains(Global.Tier2Spectators, Event Player)) == True;
- Event Player.ChangeHeroes == False;
- Array Contains(Global.ActivePlayers, Event Player) == False;
- Array Contains(Global.Tier2ActivePlayers, Event Player) == False;
- }
- actions
- {
- Event Player.GuiVisible = Event Player;
Event Player.BattleHub = Null;
- Event Player.BattleHud = Null;
- Event Player.ChangeHeroesVisible = Null;
- }
- }
rule("Spectator hub text")
- rule("Spectator HUD text")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
conditions
{
(Array Contains(Global.Spectators, Event Player) || Array Contains(Global.Tier2Spectators, Event Player)) == True;
}
- actions
- {
If(Array Contains(Global.Spectators, Event Player) == True);
- If(Event Player.NotInQueue == True);
- Event Player.QueueText = Custom String("You are not in queue");
- Else If(Array Contains(Global.Spectators, Event Player) == True);
- If(Count Of(Global.Spectators) != 0 && Count Of(Global.ActivePlayers) != 0);
- Event Player.QueueText = Custom String("Your place in queue is: {0}", Index Of Array Value(Global.Spectators, Event Player) + 1);
- Else;
- Event Player.QueueText = Custom String("Waiting for players");
- End;
End;
If(Array Contains(Global.Tier2Spectators, Event Player) == True);
- Else If(Array Contains(Global.Tier2Spectators, Event Player));
- If(Count Of(Global.Tier2Spectators) != 0 && Count Of(Global.Tier2ActivePlayers) != 0);
- Event Player.QueueText = Custom String("Your place in queue is: {0}", Index Of Array Value(Global.Tier2Spectators, Event Player)
- + 1);
- Else;
- Event Player.QueueText = Custom String("You will be fighting against the winner");
- End;
- Else;
- Event Player.QueueText = Custom String("Waiting for players");
- End;
- Wait(1, Ignore Condition);
- Loop If Condition Is True;
- Global.ActivePlayers = 0;
- }
- }
rule("Battle Hub")
- rule("Battle HUD")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
Array Contains(Global.Spectators, Event Player) == False;
Array Contains(Global.Tier2Spectators, Event Player) == False;
- (Array Contains(Global.Tier2ActivePlayers, Event Player) || Array Contains(Global.ActivePlayers, Event Player)) == True;
- }
- actions
- {
- Event Player.GuiVisible = Null;
Event Player.BattleHub = Event Player;
- Event Player.ChangeHeroesVisible = Null;
- Event Player.BattleHud = Event Player;
- Event Player.ChangeHeroes = False;
- }
- }
rule("Hub time during fight")
- rule("HUD time during fight")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
Array Contains(Global.Spectators, Event Player) == False;
Array Contains(Global.Tier2Spectators, Event Player) == False;
- (Array Contains(Global.Tier2ActivePlayers, Event Player) || Array Contains(Global.ActivePlayers, Event Player)) == True;
- }
- actions
- {
- If(Array Contains(Global.ActivePlayers, Event Player) == True);
- Event Player.Time = Global.Time1;
- End;
- If(Array Contains(Global.Tier2ActivePlayers, Event Player) == True);
- Event Player.Time = Global.Time2;
- End;
- Wait(0.016, Ignore Condition);
- Loop If Condition Is True;
- }
- }
rule("Hub time during specating")
- rule("HUD time during specating")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
(Array Contains(Global.Spectators, Event Player) || Array Contains(Global.Tier2Spectators, Event Player)) == True;
- Array Contains(Global.ActivePlayers, Event Player) == False;
- Array Contains(Global.Tier2ActivePlayers, Event Player) == False;
- }
- actions
- {
- If(Event Player.SpectatorLocationNumber == 1);
- Event Player.Time = Global.Time1;
- End;
- If(Event Player.SpectatorLocationNumber == 0);
- Event Player.Time = Global.Time2;
- End;
- Wait(0.016, Ignore Condition);
- Loop If Condition Is True;
- }
- }
- rule("Chage heroes HUB")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
- Event Player.ChangeHeroes == True;
- Array Contains(Global.ActivePlayers, Event Player) == False;
- Array Contains(Global.Tier2ActivePlayers, Event Player) == False;
- }
- actions
- {
- Event Player.GuiVisible = Null;
- Event Player.BattleHud = Null;
- Event Player.ChangeHeroesVisible = Event Player;
- }
- }
- rule("Change to normal spectator HUD")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
- Is Button Held(Event Player, Reload) == True;
- Event Player.ChangeHeroes == True;
- Event Player.RReleased == False;
- Array Contains(Global.ActivePlayers, Event Player) == False;
- Array Contains(Global.Tier2ActivePlayers, Event Player) == False;
- }
- actions
- {
- Event Player.ChangeHeroes = False;
- Event Player.RReleased = True;
- }
- }
- rule("Change to change heroes HUD")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
- Is Button Held(Event Player, Reload) == True;
- Event Player.ChangeHeroes == False;
- Event Player.RReleased == False;
- Array Contains(Global.ActivePlayers, Event Player) == False;
- Array Contains(Global.Tier2ActivePlayers, Event Player) == False;
- }
- actions
- {
- Event Player.ChangeHeroes = True;
- Event Player.RReleased = True;
- }
- }
- rule("Change selected hero")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
- Is Button Held(Event Player, Secondary Fire) == True;
- Event Player.ChangeHeroes == True;
- Array Contains(Global.ActivePlayers, Event Player) == False;
- Array Contains(Global.Tier2ActivePlayers, Event Player) == False;
- }
- actions
- {
- Event Player.ChangeHeroesSelection += 1;
- If(Event Player.ChangeHeroesSelection > 3);
- Event Player.ChangeHeroesSelection = 1;
- End;
- }
- }
- rule("Change Hero")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
- Is Button Held(Event Player, Primary Fire) == True;
- Event Player.ChangeHeroes == True;
- Array Contains(Global.ActivePlayers, Event Player) == False;
- Array Contains(Global.Tier2ActivePlayers, Event Player) == False;
- }
- actions
- {
- If(Event Player.ChangeHeroesSelection == 1);
- Start Forcing Player To Be Hero(Event Player, Hero(Genji));
- End;
- If(Event Player.ChangeHeroesSelection == 2);
- Start Forcing Player To Be Hero(Event Player, Hero(Hanzo));
- End;
- If(Event Player.ChangeHeroesSelection == 3);
- Start Forcing Player To Be Hero(Event Player, Hero(Mei));
- End;
- }
- }
- rule("Release R")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
- Event Player.RReleased == True;
- Is Button Held(Event Player, Reload) == False;
- }
- actions
- {
- Event Player.RReleased = False;
- }
- }
- rule("Remove yourself from queue")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
- Is Button Held(Event Player, Interact) == True;
- Event Player.FReleased == False;
- Event Player.NotInQueue == False;
- }
- actions
- {
- Event Player.FReleased = True;
- Modify Global Variable(Spectators, Remove From Array By Value, Event Player);
- Modify Global Variable(Tier2Spectators, Remove From Array By Value, Event Player);
- Event Player.NotInQueue = True;
- Event Player.BattleQueueRemovalText = Custom String("You have been removed from queue. Press F to cancel.");
- Event Player.SpectatorQueueRemovalText = Custom String("You are not in queue. Press F to put yourself in queue.");
- }
- }
- rule("Put yourself back in queue")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
- Is Button Held(Event Player, Interact) == True;
- Event Player.FReleased == False;
- Event Player.NotInQueue == True;
- }
- actions
- {
- Event Player.FReleased = True;
- Event Player.NotInQueue = False;
- Event Player.BattleQueueRemovalText = Custom String("Press F to remove yourself from queue if you want to change heroes or afk");
- Event Player.SpectatorQueueRemovalText = Custom String("Press F to remove yourself from queue");
- }
- }
- rule("Release F")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
- Event Player.FReleased == True;
- Is Button Held(Event Player, Interact) == False;
- }
- actions
- {
- Event Player.FReleased = False;
- }
- }
- rule("")
- {
- event
- {
- Ongoing - Global;
- }
- }