Create
Return to post

Comparing difference between and

View raw
  • //Legacy version of Heroes Training Chamber.
  • //Controls: Melee for 0.5s to choose hero/training, Interact for 2s to go back to Main Menu
  • //Copy from next line onwards
  • settings
  • {
  • main
  • {
  • Description: "-★- Heroes Training Chamber by DragonEngineer -★- A general aim/reaction trainer for any hero! Selecting training partner by holding melee for 0.5 second. Only supports singleplayer. Feedback on my discord is appreciated. -★- Other workshops: workshop.codes/users/DragonEngineer -★- DragonEngineer's Workshop Discord: discord.gg/9su249k"
  • Description: "Legacy version of Heroes Training Chamber. Controls: Melee for 0.5s to choose hero/training, Interact for 2s to go back to Main Menu."
  • }
  • lobby
  • {
  • Map Rotation: After A Game
  • Max Spectators: 6
  • Max Team 1 Players: 1
  • Max Team 2 Players: 0
  • Return To Lobby: Never
  • Swap Teams After Match: No
  • }
  • modes
  • {
  • Skirmish
  • {
  • enabled maps
  • {
  • Workshop Chamber
  • }
  • }
  • General
  • {
  • Hero Limit: Off
  • Respawn Time Scalar: 0%
  • }
  • }
  • heroes
  • {
  • Team 2
  • {
  • Ability Cooldown Time: 50%
  • Reinhardt
  • {
  • Barrier Field Recharge Rate: 500%
  • }
  • }
  • }
  • }
  • variables
  • {
  • global:
  • 0: chosenTraining
  • 1: controlIndex
  • 2: headerText
  • 3: subheaderText
  • 4: footnoteText
  • 5: botAimingAccuracy
  • 6: multipleBots
  • 7: exitButton
  • 8: mainMenu_ButtonPos
  • 9: mainMenu_ButtonTexts
  • 10: mainMenu_ButtonColour
  • 11: trainingButton_isEnabled
  • 12: aiming_ButtonPos
  • 13: aiming_EnemyHeroes
  • 14: aimingModifier_isEnabled
  • 15: aimingModifier_ButtonPos
  • 16: aimingModifier_ButtonTexts
  • 17: reaction_ButtonPos
  • 18: reaction_EnemyHeroes
  • 19: reaction_LargerDistanceHeroes
  • 20: reaction_TestIsRunning
  • 21: hideUIButton
  • 22: isUIHidden
  • 23: changeHeroButton
  • player:
  • 0: botThrottle
  • 1: botFacing
  • 2: botState
  • 3: botFacingOffset
  • 4: botSpawnLocation
  • 5: botSpawnFacing
  • }
  • subroutines
  • {
  • 0: ChangeDirection
  • 1: JumpAndCrouch
  • }
  • rule("[Init] Global Variable")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • actions
  • {
  • Disable Inspector Recording;
  • "Currently selected training"
  • Global.chosenTraining = 0;
  • "Top header text"
  • Global.headerText = Array(Custom String("Heroes Training Chamber"), Custom String("Aim Training"), Custom String(
  • "Reaction Training"));
  • "Subheader text"
  • Global.subheaderText = Array(Custom String("Main Menu"), Custom String("Select enemy"), Custom String("Select enemy"));
  • "Footnote text"
  • Global.footnoteText = Array(Custom String("Select training"), Custom String("Select enemy"), Custom String("Select enemy"));
  • "Exit button location"
  • Global.exitButton = Vector(-19.500, 25, 16);
  • "Hide UI button location"
  • Global.hideUIButton = Vector(-19.500, 25, -16);
  • Global.isUIHidden = False;
  • "Change Heroes button location"
  • Global.changeHeroButton = Vector(-19.500, 20, -16);
  • "Bot's aiming accuracy"
  • Global.botAimingAccuracy = Workshop Setting Real(Custom String("Aim Training settings"), Custom String("Bot's aiming accuracy"),
  • 0.500, 0, 1, 0);
  • "Multiple bots spawning"
  • Global.multipleBots = Workshop Setting Toggle(Custom String("Aim Training settings"), Custom String(
  • "Allow multiple bots spawning"), False, 0);
  • }
  • }
  • rule("[Init] Menu data")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • actions
  • {
  • "Main Menu training buttons and text locations"
  • Global.mainMenu_ButtonPos = Array(Vector(-19.500, 12, 8), Vector(-19.500, 12, -8));
  • Global.mainMenu_ButtonTexts = Array(Custom String("Aim Training"), Custom String("Reaction Training"));
  • Global.mainMenu_ButtonColour = Array(Color(Blue), Color(Sky Blue));
  • "Aim training heroes list and button location"
  • Global.aiming_ButtonPos = Array(Vector(-19.500, 10, 16), Vector(-19.500, 10, 12), Vector(-19.500, 10, 8), Vector(-19.500, 10, 4),
  • Vector(-19.500, 10, 0), Vector(-19.500, 10, -4), Vector(-19.500, 10, -8), Vector(-19.500, 10, -12), Vector(-19.500, 10, -16),
  • Vector(-19.500, 5, 16), Vector(-19.500, 5, 12), Vector(-19.500, 5, 8), Vector(-19.500, 5, 4), Vector(-19.500, 5, 0), Vector(
  • -19.500, 5, -4), Vector(-19.500, 5, -8), Vector(-19.500, 5, -12), Vector(-19.500, 5, -16));
  • Global.aiming_EnemyHeroes = Array(Hero(Ana), Hero(McCree), Hero(Soldier: 76), Hero(Reaper), Hero(Reinhardt), Hero(Moira), Hero(
  • Global.aiming_EnemyHeroes = Array(Hero(Ana), Hero(Cassidy), Hero(Soldier: 76), Hero(Reaper), Hero(Reinhardt), Hero(Moira), Hero(
  • Hanzo), Hero(D.Va), Hero(Winston), Hero(Tracer), Hero(Genji), Hero(Doomfist), Hero(Lúcio), Hero(Echo), Hero(Pharah), Hero(
  • Widowmaker), Hero(Ashe), Hero(Mei));
  • "Aim Training Modifiers"
  • Global.aimingModifier_ButtonPos = Array(Vector(-19.500, 15, 16), Vector(-19.500, 15, 9.600), Vector(-19.500, 15, 3.200), Vector(
  • -19.500, 15, -3.200), Vector(-19.500, 15, -9.600), Vector(-19.500, 15, -16));
  • Global.aimingModifier_ButtonTexts = Array(Custom String("{0} More HP", Icon String(Plus)), Custom String("{0} {1}", String(
  • "Enemy"), Hero Icon String(Hero(Mercy))), Custom String("{0} Invincible", Ability Icon String(Hero(Baptiste), Button(
  • Ability 2))), Custom String("{0} {1}", String("Ally"), Hero Icon String(Hero(Mercy))), Custom String("{0} Infinite Ammo",
  • Icon String(Recycle)), Custom String("{0} Middle Wall", Ability Icon String(Hero(Mei), Button(Ability 2))));
  • "Reactions training heroes list and buttons location"
  • Global.reaction_ButtonPos = Array(Vector(-19.500, 15, 14), Vector(-19.500, 15, 10), Vector(-19.500, 15, 6), Vector(-19.500, 15, 2),
  • Vector(-19.500, 15, -2), Vector(-19.500, 15, -6), Vector(-19.500, 15, -10), Vector(-19.500, 15, -14), Vector(-19.500, 10, 12),
  • Vector(-19.500, 10, 8), Vector(-19.500, 10, 4), Vector(-19.500, 10, 0), Vector(-19.500, 10, -4), Vector(-19.500, 10, -8),
  • Vector(-19.500, 10, -12), Vector(-19.500, 5, 14), Vector(-19.500, 5, 10), Vector(-19.500, 5, 6), Vector(-19.500, 5, 2), Vector(
  • -19.500, 5, -2), Vector(-19.500, 5, -6), Vector(-19.500, 5, -10), Vector(-19.500, 5, -14));
  • Global.reaction_EnemyHeroes = Array(Hero(Ana), Hero(Brigitte), Hero(Lúcio), Hero(Mercy), Hero(Moira), Hero(D.Va), Hero(Reinhardt),
  • Hero(Roadhog), Hero(Sigma), Hero(Wrecking Ball), Hero(Zarya), Hero(Ashe), Hero(Bastion), Hero(Doomfist), Hero(Genji), Hero(
  • Hanzo), Hero(Junkrat), Hero(McCree), Hero(Mei), Hero(Pharah), Hero(Reaper), Hero(Sombra), Hero(Tracer));
  • Hanzo), Hero(Junkrat), Hero(Cassidy), Hero(Mei), Hero(Pharah), Hero(Reaper), Hero(Sombra), Hero(Tracer));
  • Global.reaction_LargerDistanceHeroes = Array(Hero(Sigma), Hero(Junkrat), Hero(Roadhog), Hero(Pharah));
  • }
  • }
  • rule("[Player] Disable collision with players")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 1;
  • Slot 0;
  • }
  • conditions
  • {
  • Has Spawned(Event Player) == True;
  • }
  • actions
  • {
  • Disable Movement Collision With Players(Event Player);
  • }
  • }
  • disabled rule("----- Main Menu -----")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • }
  • rule("[Effects] - Init texts, hide UI, back button for the trainer")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • actions
  • {
  • "Header text"
  • Create In-World Text(!Global.isUIHidden ? All Players(All Teams) : Null, Global.headerText[Global.chosenTraining], Vector(-19.500,
  • 30, 0), 5, Do Not Clip, Visible To String and Color, Global.chosenTraining >= 1 ? Color(Orange) : Color(Turquoise),
  • Default Visibility);
  • "Sub header text"
  • Create In-World Text(!Global.isUIHidden ? All Players(All Teams) : Null, Global.subheaderText[Global.chosenTraining], Vector(
  • -19.500, 25, 0), 2.500, Do Not Clip, Visible To Position and String, Color(Lime Green), Default Visibility);
  • "Hold for 0.5 sec"
  • Create In-World Text(!Global.isUIHidden ? All Players(All Teams) : Null, Custom String("Press [{1}] for 0.5s to {0}",
  • Global.footnoteText[Global.chosenTraining], Input Binding String(Button(Melee))), Vector(-19.500, 0, 0), 1.500, Do Not Clip,
  • Visible To Position and String, Color(Yellow), Default Visibility);
  • "Exit button"
  • Create Effect(Global.chosenTraining >= 1 ? All Players(All Teams) : Null, Sphere, Color(Rose), Global.exitButton, 1,
  • Visible To and Color);
  • Create In-World Text(Global.chosenTraining >= 1 ? All Players(All Teams) : Null, Custom String("{0} Back", Icon String(
  • Arrow: Left)), Global.exitButton, 1.500, Do Not Clip, Visible To, Color(Rose), Default Visibility);
  • "Hide UI button"
  • Create Effect(Global.chosenTraining >= 1 ? All Players(All Teams) : Null, Sphere, Global.isUIHidden ? Color(Green) : Color(
  • Sky Blue), Global.hideUIButton, 1, Visible To and Color);
  • Create In-World Text(Global.chosenTraining >= 1 ? All Players(All Teams) : Null, Custom String("{0} Hide UI: {1}",
  • Ability Icon String(Hero(Sombra), Button(Ability 1)), Global.isUIHidden ? Icon String(Checkmark) : Icon String(X)),
  • Global.hideUIButton, 1.500, Do Not Clip, Visible To String and Color, Global.isUIHidden ? Color(Green) : Color(Sky Blue),
  • Default Visibility);
  • "Change Heroes button"
  • Create Effect(All Players(All Teams), Sphere, Color(Aqua), Global.changeHeroButton, 1, Visible To);
  • Create In-World Text(All Players(All Teams), Custom String("{0} Change Heroes", Icon String(Recycle)), Global.changeHeroButton,
  • 1.500, Do Not Clip, Visible To, Color(Aqua), Default Visibility);
  • "Reaction Training Ring"
  • Create Effect(Global.chosenTraining == 2 ? All Players(All Teams) : Null, Ring, Color(Green), Vector(0, 0, 0), 4, Visible To);
  • "Creator info"
  • Create HUD Text(All Players(All Teams), Custom String(" AZSX9 "), Custom String("{0} Heroes Training Chamber by DragonEngineer",
  • Ability Icon String(Hero(Genji), Button(Jump))), Custom String("discord.gg/9su249k [All lowercase]"), Right, 0, Color(
  • Turquoise), Color(Green), Color(Yellow), Visible To and String, Default Visibility);
  • }
  • }
  • rule("[Effects] - Create button effects for all gamemodes")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • actions
  • {
  • "Create button effect for the trainings"
  • For Global Variable(controlIndex, 0, Count Of(Global.mainMenu_ButtonPos), 1);
  • Create Effect(Global.chosenTraining == 0 ? All Players(All Teams) : Null, Sphere, Global.mainMenu_ButtonColour[Evaluate Once(
  • Global.controlIndex)], Global.mainMenu_ButtonPos[Evaluate Once(Global.controlIndex)], 1, Visible To);
  • Create In-World Text(Global.chosenTraining == 0 ? All Players(All Teams) : Null, Global.mainMenu_ButtonTexts[Evaluate Once(
  • Global.controlIndex)], Global.mainMenu_ButtonPos[Evaluate Once(Global.controlIndex)], 2, Do Not Clip, Visible To,
  • Global.mainMenu_ButtonColour[Evaluate Once(Global.controlIndex)], Default Visibility);
  • End;
  • "Create the button effects aim training hero selection"
  • For Global Variable(controlIndex, 0, Count Of(Global.aiming_ButtonPos), 1);
  • Create Effect(Global.chosenTraining == 1 && !Global.isUIHidden ? All Players(All Teams) : Null, Sphere,
  • Global.trainingButton_isEnabled[Evaluate Once(Global.controlIndex)] ? Color(Green) : Color(Orange),
  • Global.aiming_ButtonPos[Evaluate Once(Global.controlIndex)], 1, Visible To and Color);
  • Create In-World Text(Global.chosenTraining == 1 && !Global.isUIHidden ? All Players(All Teams) : Null, Hero Icon String(
  • Global.aiming_EnemyHeroes[Evaluate Once(Global.controlIndex)]), Global.aiming_ButtonPos[Evaluate Once(Global.controlIndex)], 2,
  • Clip Against Surfaces, Visible To, Color(White), Default Visibility);
  • End;
  • "Create the button effects aim training modifiers"
  • For Global Variable(controlIndex, 0, Count Of(Global.aimingModifier_ButtonPos), 1);
  • Create Effect(Global.chosenTraining == 1 && !Global.isUIHidden ? All Players(All Teams) : Null, Sphere,
  • Global.aimingModifier_isEnabled[Evaluate Once(Global.controlIndex)] ? Color(Green) : Color(Yellow),
  • Global.aimingModifier_ButtonPos[Evaluate Once(Global.controlIndex)], 1, Visible To and Color);
  • Create In-World Text(Global.chosenTraining == 1 && !Global.isUIHidden ? All Players(All Teams) : Null, Custom String("{0}: {1}",
  • Global.aimingModifier_ButtonTexts[Evaluate Once(Global.controlIndex)], Global.aimingModifier_isEnabled[Evaluate Once(
  • Global.controlIndex)] ? Icon String(Checkmark) : Icon String(X)), Global.aimingModifier_ButtonPos[Evaluate Once(
  • Global.controlIndex)], 1.300, Do Not Clip, Visible To String and Color, Global.aimingModifier_isEnabled[Evaluate Once(
  • Global.controlIndex)] ? Color(Green) : Color(Yellow), Default Visibility);
  • End;
  • "Create the button effects reaction hero selection"
  • For Global Variable(controlIndex, 0, Count Of(Global.reaction_ButtonPos), 1);
  • Create Effect(Global.chosenTraining == 2 && !Global.isUIHidden ? All Players(All Teams) : Null, Sphere,
  • Global.trainingButton_isEnabled[Evaluate Once(Global.controlIndex)] ? Color(Green) : Color(Orange),
  • Global.reaction_ButtonPos[Evaluate Once(Global.controlIndex)], 1, Visible To and Color);
  • Create In-World Text(Global.chosenTraining == 2 && !Global.isUIHidden ? All Players(All Teams) : Null, Hero Icon String(
  • Global.reaction_EnemyHeroes[Evaluate Once(Global.controlIndex)]), Global.reaction_ButtonPos[Evaluate Once(Global.controlIndex)
  • ], 2, Clip Against Surfaces, Visible To, Color(White), Default Visibility);
  • End;
  • }
  • }
  • rule("[Main Menu] When at main menu, reset some of the settings and destroy bots")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Global.chosenTraining == 0;
  • }
  • actions
  • {
  • "Destroy bots"
  • Destroy All Dummy Bots;
  • "Reset the buttons"
  • Global.aimingModifier_isEnabled = Array(False, False, False, False, False);
  • Global.trainingButton_isEnabled = Empty Array;
  • Global.isUIHidden = False;
  • "Fully restore player HP and clear invincible"
  • Set Player Health(Players In Slot(0, Team 1), Max Health(Players In Slot(0, Team 1)));
  • Clear Status(Players In Slot(0, Team 1), Unkillable);
  • }
  • }
  • rule("[Back button] Pressing back button")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 1;
  • Slot 0;
  • }
  • conditions
  • {
  • Global.chosenTraining >= 1;
  • Is Button Held(Event Player, Button(Melee)) == True;
  • Distance Between(Global.exitButton, Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)
  • + Facing Direction Of(Event Player) * Distance Between(Eye Position(Event Player), Global.exitButton), Null, Event Player,
  • True)) <= 1;
  • "Prevent players from overlapping selection of training bots and back button"
  • X Component Of(Position Of(Event Player)) >= -16;
  • }
  • actions
  • {
  • Wait(0.500, Abort When False);
  • "Set state to 0"
  • Global.chosenTraining = 0;
  • }
  • }
  • rule("[Selection] Select a training")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 1;
  • Slot 0;
  • }
  • conditions
  • {
  • Global.chosenTraining == 0;
  • Is Button Held(Event Player, Button(Melee)) == True;
  • Is True For Any(Global.mainMenu_ButtonPos, Distance Between(Current Array Element, Ray Cast Hit Position(Eye Position(
  • Event Player), Eye Position(Event Player) + Facing Direction Of(Event Player) * Distance Between(Eye Position(Event Player),
  • Current Array Element), Null, Event Player, True)) <= 1) == True;
  • }
  • actions
  • {
  • Wait(0.500, Abort When False);
  • "Detect which button index is pressed"
  • Global.chosenTraining = Index Of Array Value(Global.mainMenu_ButtonPos, First Of(Sorted Array(Filtered Array(
  • Global.mainMenu_ButtonPos, Distance Between(Current Array Element, Ray Cast Hit Position(Eye Position(Event Player),
  • Eye Position(Event Player) + Facing Direction Of(Event Player) * Distance Between(Eye Position(Event Player),
  • Current Array Element), Null, Event Player, True)) <= 1), Distance Between(Eye Position(Event Player),
  • Current Array Element))));
  • Global.chosenTraining += 1;
  • }
  • }
  • disabled rule("----- Weapon Aiming -----")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • }
  • rule("[Aiming] - Init settings")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Global.chosenTraining == 1;
  • }
  • actions
  • {
  • "Set false for the buttons"
  • For Global Variable(controlIndex, 0, Count Of(Global.aiming_ButtonPos), 1);
  • Global.trainingButton_isEnabled[Global.controlIndex] = False;
  • End;
  • "Aim training modifiers"
  • Global.aimingModifier_isEnabled = Array(False, False, False, False, False);
  • }
  • }
  • rule("[Aiming] - Choosing Enemy")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 1;
  • Slot 0;
  • }
  • conditions
  • {
  • Global.chosenTraining == 1;
  • Is Button Held(Event Player, Button(Melee)) == True;
  • Global.isUIHidden == False;
  • Is True For Any(Global.aiming_ButtonPos, Distance Between(Current Array Element, Ray Cast Hit Position(Eye Position(Event Player),
  • Eye Position(Event Player) + Facing Direction Of(Event Player) * Distance Between(Eye Position(Event Player),
  • Current Array Element), Null, Event Player, True)) <= 1) == True;
  • }
  • actions
  • {
  • Wait(0.500, Abort When False);
  • "Find the hero that is selected"
  • Global.controlIndex = Index Of Array Value(Global.aiming_ButtonPos, First Of(Sorted Array(Filtered Array(Global.aiming_ButtonPos,
  • Distance Between(Current Array Element, Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)
  • + Facing Direction Of(Event Player) * Distance Between(Eye Position(Event Player), Current Array Element), Null, Event Player,
  • True)) <= 1), Distance Between(Eye Position(Event Player), Current Array Element))));
  • Abort If(Global.controlIndex == -1);
  • "If allows for multiple bots to spawn"
  • If(Global.multipleBots);
  • "if the selected hero is not active"
  • If(!Is Hero Being Played(Global.aiming_EnemyHeroes[Global.controlIndex], Team 2));
  • Abort If(Number Of Players(Team 2) >= 6);
  • Create Dummy Bot(Global.aiming_EnemyHeroes[Global.controlIndex], Team 2, -1, Vector(0, 0, 0), Vector(0, 0, 0));
  • Global.trainingButton_isEnabled[Global.controlIndex] = True;
  • Play Effect(Event Player, Buff Explosion Sound, Color(White), Event Player, 100);
  • Else;
  • Abort If(Number Of Players(Team 2) <= 0);
  • Destroy Dummy Bot(Team 2, Slot Of(Filtered Array(All Players(Team 2), Is Dummy Bot(Current Array Element) && Hero Of(
  • Current Array Element) == Global.aiming_EnemyHeroes[Global.controlIndex])));
  • Global.trainingButton_isEnabled[Global.controlIndex] = False;
  • Play Effect(Event Player, Ring Explosion Sound, Color(White), Event Player, 100);
  • End;
  • "If only allows 1 bot"
  • Else;
  • "if the selected hero is active"
  • If(Entity Exists(Players In Slot(0, Team 2)));
  • Global.trainingButton_isEnabled[Index Of Array Value(Global.aiming_EnemyHeroes, Hero Of(Players In Slot(0, Team 2)))] = False;
  • End;
  • "If the selected hero is the same as the active hero, despawn the bot"
  • If(Global.aiming_EnemyHeroes[Global.controlIndex] == Hero Of(Players In Slot(0, Team 2)));
  • Destroy Dummy Bot(Team 2, 0);
  • Play Effect(Event Player, Ring Explosion Sound, Color(White), Event Player, 100);
  • Abort;
  • End;
  • "Created dummy bot that is different from the active one"
  • Create Dummy Bot(Global.aiming_EnemyHeroes[Global.controlIndex], Team 2, 0, Vector(0, 0, 0), Vector(0, 0, 0));
  • Global.trainingButton_isEnabled[Global.controlIndex] = True;
  • Play Effect(Event Player, Buff Explosion Sound, Color(White), Event Player, 100);
  • End;
  • }
  • }
  • rule("[Aiming] [All] - Init the Enemies")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 2;
  • All;
  • }
  • conditions
  • {
  • Global.chosenTraining == 1;
  • Is Dummy Bot(Event Player) == True;
  • Is Alive(Event Player) == True;
  • Hero Of(Event Player) != Hero(Mercy);
  • }
  • actions
  • {
  • Teleport(Event Player, Vector(0, 0, 0));
  • Event Player.botState = 0;
  • "Start moving"
  • Start Throttle In Direction(Event Player, Event Player.botThrottle, 1, To Player, Replace existing throttle,
  • Direction and Magnitude);
  • "Start facing player"
  • Start Facing(Event Player, Direction Towards(Eye Position(Event Player), Event Player.botFacingOffset + Eye Position(
  • Players In Slot(0, Team 1))), 100, To World, Direction and Turn Rate);
  • "More HP if the mode has more nemey health enabled"
  • If(Global.aimingModifier_isEnabled[0]);
  • Set Max Health(Event Player, 1000);
  • Wait(0.100, Ignore Condition);
  • Set Player Health(Event Player, Max Health(Event Player));
  • End;
  • }
  • }
  • rule("[Aiming] [Ana] - Movement control")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 2;
  • Ana;
  • }
  • conditions
  • {
  • Global.chosenTraining == 1;
  • Is Dummy Bot(Event Player) == True;
  • }
  • actions
  • {
  • "Change Throttle direction"
  • Call Subroutine(ChangeDirection);
  • "Jump and Crouch"
  • If(Is On Ground(Event Player));
  • Start Rule(JumpAndCrouch, Do Nothing);
  • End;
  • "Use sleep dart"
  • If(Ability Cooldown(Event Player, Button(Ability 1)) == 0);
  • Press Button(Event Player, Button(Ability 1));
  • Wait(2, Ignore Condition);
  • Clear Status(Players In Slot(0, Team 1), Asleep);
  • End;
  • Wait(0.500, Abort When False);
  • Loop If Condition Is True;
  • }
  • }
  • rule("[Aiming] [Mccree] - Movement control")
  • rule("[Aiming] [Cassidy] - Movement control")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 2;
  • McCree;
  • Cassidy;
  • }
  • conditions
  • {
  • Global.chosenTraining == 1;
  • Is Dummy Bot(Event Player) == True;
  • }
  • actions
  • {
  • "Change throttle direction"
  • Call Subroutine(ChangeDirection);
  • "Use roll when ready"
  • If(Ability Cooldown(Event Player, Button(Ability 1)) == 0);
  • Press Button(Event Player, Button(Ability 1));
  • End;
  • "Use flashbang when ready"
  • If(Ability Cooldown(Event Player, Button(Ability 2)) == 0 && Distance Between(Event Player, Players In Slot(0, Team 1)) < 6);
  • Press Button(Event Player, Button(Ability 2));
  • End;
  • "Jump and Crouch"
  • If(Is On Ground(Event Player));
  • Start Rule(JumpAndCrouch, Do Nothing);
  • End;
  • "Use weapon"
  • Press Button(Event Player, Button(Primary Fire));
  • Wait(0.500, Abort When False);
  • Loop If Condition Is True;
  • }
  • }
  • rule("[Aiming] [Soldier 76] - Movement control")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 2;
  • Soldier: 76;
  • }
  • conditions
  • {
  • Global.chosenTraining == 1;
  • Is Dummy Bot(Event Player) == True;
  • }
  • actions
  • {
  • "Change throttle direction"
  • Call Subroutine(ChangeDirection);
  • "Jump and Crouch"
  • If(Is On Ground(Event Player));
  • Start Rule(JumpAndCrouch, Do Nothing);
  • End;
  • "Use heal when ready and low HP"
  • If(Ability Cooldown(Event Player, Button(Ability 2)) == 0 && Normalized Health(Event Player) < 0.500);
  • Stop Holding Button(Event Player, Button(Primary Fire));
  • Press Button(Event Player, Button(Ability 2));
  • End;
  • Wait(0.500, Abort When False);
  • "Use weapon"
  • If(!Is Firing Primary(Event Player));
  • Start Holding Button(Event Player, Button(Primary Fire));
  • End;
  • Wait(0.500, Abort When False);
  • Loop If Condition Is True;
  • }
  • }
  • rule("[Aiming] [Reaper] - Movement control")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 2;
  • Reaper;
  • }
  • conditions
  • {
  • Global.chosenTraining == 1;
  • Is Dummy Bot(Event Player) == True;
  • }
  • actions
  • {
  • "Change Throttle direction"
  • Call Subroutine(ChangeDirection);
  • "Jump and Crouch"
  • If(Is On Ground(Event Player));
  • Start Rule(JumpAndCrouch, Do Nothing);
  • End;
  • "Use wraith formwhen ready"
  • If(Ability Cooldown(Event Player, Button(Ability 1)) == 0 && !Is Using Ability 1(Event Player));
  • Press Button(Event Player, Button(Ability 1));
  • End;
  • "Use weapon"
  • If(!Is Using Ability 1(Event Player));
  • Press Button(Event Player, Button(Primary Fire));
  • End;
  • Wait(0.500, Abort When False);
  • Loop If Condition Is True;
  • }
  • }
  • rule("[Aiming] [Reinhardt] - Movement control")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 2;
  • Reinhardt;
  • }
  • conditions
  • {
  • Global.chosenTraining == 1;
  • Is Dummy Bot(Event Player) == True;
  • }
  • actions
  • {
  • "Change Throttle direction"
  • Call Subroutine(ChangeDirection);
  • "Use hammer"
  • If(!Is Firing Primary(Event Player) && Distance Between(Position Of(Event Player), Position Of(Players In Slot(0, Team 1))) <= 5);
  • Stop Holding Button(Event Player, Button(Secondary Fire));
  • Start Holding Button(Event Player, Button(Primary Fire));
  • End;
  • "Use shield"
  • If(!Is Firing Secondary(Event Player) && Distance Between(Position Of(Event Player), Position Of(Players In Slot(0, Team 1))) > 5);
  • Stop Holding Button(Event Player, Button(Primary Fire));
  • Start Holding Button(Event Player, Button(Secondary Fire));
  • End;
  • "Use charge when player is near Rein"
  • If(Ability Cooldown(Event Player, Button(Ability 1)) == 0 && Distance Between(Event Player, Players In Slot(0, Team 1)) <= 3);
  • Press Button(Event Player, Button(Ability 1));
  • End;
  • Wait(1, Abort When False);
  • Loop If Condition Is True;
  • }
  • }
  • rule("[Aiming] [Moira] - Movement control")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 2;
  • Moira;
  • }
  • conditions
  • {
  • Global.chosenTraining == 1;
  • Is Dummy Bot(Event Player) == True;
  • }
  • actions
  • {
  • "Change Throttle direction"
  • Call Subroutine(ChangeDirection);
  • "Jump and Crouch"
  • If(Is On Ground(Event Player));
  • Start Rule(JumpAndCrouch, Do Nothing);
  • End;
  • "Use Fade when ready"
  • If(Ability Cooldown(Event Player, Button(Ability 1)) == 0);
  • Press Button(Event Player, Button(Ability 1));
  • End;
  • Wait(0.500, Abort When False);
  • "Use weapon"
  • If(!Is Firing Secondary(Event Player));
  • Start Holding Button(Event Player, Button(Secondary Fire));
  • End;
  • Loop If Condition Is True;
  • }
  • }
  • rule("[Aiming] [Winston] - Movement control")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 2;
  • Winston;
  • }
  • conditions
  • {
  • Global.chosenTraining == 1;
  • Is Dummy Bot(Event Player) == True;
  • }
  • actions
  • {
  • "Change Throttle direction"
  • Call Subroutine(ChangeDirection);
  • "Use Leap when ready"
  • If(Ability Cooldown(Event Player, Button(Ability 1)) == 0);
  • Start Facing(Event Player, Vector(Random Real(-1, 1), Random Real(0, 1), Random Real(-1, 1)), 360, To World,
  • Direction and Turn Rate);
  • Wait(0.250, Ignore Condition);
  • Press Button(Event Player, Button(Ability 1));
  • Wait(1, Ignore Condition);
  • "Start facing player"
  • Start Facing(Event Player, Direction Towards(Eye Position(Event Player), Event Player.botFacingOffset + Eye Position(
  • Players In Slot(0, Team 1))), 100, To World, Direction and Turn Rate);
  • End;
  • "Use shield when player is near Winston"
  • If(Ability Cooldown(Event Player, Button(Ability 2)) == 0 && Distance Between(Event Player, Players In Slot(0, Team 1)) <= 8);
  • Press Button(Event Player, Button(Ability 2));
  • End;
  • Wait(0.500, Abort When False);
  • Loop If Condition Is True;
  • }
  • }
  • rule("[Aiming] [Dva] - Movement control")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 2;
  • D.Va;
  • }
  • conditions
  • {
  • Global.chosenTraining == 1;
  • Is Dummy Bot(Event Player) == True;
  • }
  • actions
  • {
  • "Change Throttle direction"
  • Call Subroutine(ChangeDirection);
  • "For mech dva only"
  • If(!Is In Alternate Form(Event Player));
  • "Use Boosters when ready"
  • If(Ability Cooldown(Event Player, Button(Ability 1)) == 0 && !Is Using Ability 1(Event Player));
  • "Random facing when player is using ability"
  • Start Facing(Event Player, Event Player.botFacing, 360, To World, Direction and Turn Rate);
  • Press Button(Event Player, Button(Ability 1));
  • Wait(0.500, Abort When False);
  • "Change facing direction throughout "
  • While(Is Using Ability 1(Event Player));
  • Event Player.botFacing = Vector(Random Real(-1, 1), Random Real(-0.500, 0.500), Random Real(-1, 1));
  • Wait(0.500, Abort When False);
  • End;
  • "Start facing player"
  • Start Facing(Event Player, Direction Towards(Eye Position(Event Player), Event Player.botFacingOffset + Eye Position(
  • Players In Slot(0, Team 1))), 100, To World, Direction and Turn Rate);
  • End;
  • "When in Baby Dva"
  • Else;
  • "Jump and Crouch"
  • If(Is On Ground(Event Player));
  • Start Rule(JumpAndCrouch, Do Nothing);
  • End;
  • End;
  • Wait(0.500, Abort When False);
  • Loop If Condition Is True;
  • }
  • }
  • rule("[Aiming] [Hanzo] - Movement control")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 2;
  • Hanzo;
  • }
  • conditions
  • {
  • Global.chosenTraining == 1;
  • Is Dummy Bot(Event Player) == True;
  • }
  • actions
  • {
  • "Change Throttle direction"
  • Call Subroutine(ChangeDirection);
  • "Jump and Crouch"
  • If(Is On Ground(Event Player));
  • Start Rule(JumpAndCrouch, Do Nothing);
  • End;
  • "Use Lunge when ready"
  • If(Ability Cooldown(Event Player, Button(Jump)) == 0);
  • Press Button(Event Player, Button(Jump));
  • Wait(0.250, Ignore Condition);
  • Press Button(Event Player, Button(Jump));
  • End;
  • "Use weapon"
  • Start Holding Button(Event Player, Button(Primary Fire));
  • Wait(Random Real(0.500, 0.800), Abort When False);
  • Stop Holding Button(Event Player, Button(Primary Fire));
  • Wait(0.500, Abort When False);
  • Loop If Condition Is True;
  • }
  • }
  • rule("[Aiming] [Tracer] - Movement control")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 2;
  • Tracer;
  • }
  • conditions
  • {
  • Global.chosenTraining == 1;
  • Is Dummy Bot(Event Player) == True;
  • }
  • actions
  • {
  • "Change Throttle direction"
  • Call Subroutine(ChangeDirection);
  • "Use blink when ready"
  • If(Ability Cooldown(Event Player, Button(Ability 1)) == 0);
  • Press Button(Event Player, Button(Ability 1));
  • End;
  • "Use recall when ready and less than 80% HP"
  • If(Ability Cooldown(Event Player, Button(Ability 2)) == 0 && Normalized Health(Event Player) < 0.800);
  • Wait(0.500, Ignore Condition);
  • Stop Holding Button(Event Player, Button(Primary Fire));
  • Press Button(Event Player, Button(Ability 2));
  • End;
  • "Jump and Crouch"
  • If(Is On Ground(Event Player));
  • Start Rule(JumpAndCrouch, Do Nothing);
  • End;
  • "Use weapon"
  • If(!Is Firing Primary(Event Player));
  • Start Holding Button(Event Player, Button(Primary Fire));
  • End;
  • Wait(0.500, Abort When False);
  • Loop If Condition Is True;
  • }
  • }
  • rule("[Aiming] [Genji] - Movement control")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 2;
  • Genji;
  • }
  • conditions
  • {
  • Global.chosenTraining == 1;
  • Is Dummy Bot(Event Player) == True;
  • }
  • actions
  • {
  • "Change Throttle direction"
  • Call Subroutine(ChangeDirection);
  • "Choosing which ability to use"
  • If(Ability Cooldown(Event Player, Button(Ability 1)) == 0 && Ability Cooldown(Event Player, Button(Ability 2))
  • == 0 && !Is Using Ability 2(Event Player));
  • Event Player.botState = Random Integer(1, 2);
  • Else If(Ability Cooldown(Event Player, Button(Ability 1)) == 0);
  • Event Player.botState = 1;
  • Else;
  • Event Player.botState = 2;
  • End;
  • "Use Dash"
  • If(Event Player.botState == 1 && !Is Using Ability 2(Event Player));
  • Start Facing(Event Player, Vector(Random Real(-1, 1), Random Real(0, 1), Random Real(-1, 1)), 360, To World,
  • Direction and Turn Rate);
  • Wait(0.250, Ignore Condition);
  • Press Button(Event Player, Button(Ability 1));
  • Wait(0.250, Ignore Condition);
  • "Start facing player"
  • Start Facing(Event Player, Direction Towards(Eye Position(Event Player), Event Player.botFacingOffset + Eye Position(
  • Players In Slot(0, Team 1))), 100, To World, Direction and Turn Rate);
  • "Use deflect"
  • Else If(Event Player.botState == 2 && !Is Using Ability 2(Event Player));
  • Press Button(Event Player, Button(Ability 2));
  • End;
  • "Use weapon"
  • If(!Is Firing Primary(Event Player) && !Is Using Ability 2(Event Player));
  • Start Holding Button(Event Player, Button(Primary Fire));
  • End;
  • Wait(0.500, Abort When False);
  • Loop If Condition Is True;
  • }
  • }
  • rule("[Aiming] [Genji] - Double Jump control")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 2;
  • Genji;
  • }
  • conditions
  • {
  • Global.chosenTraining == 1;
  • Is Dummy Bot(Event Player) == True;
  • Is On Ground(Event Player) == True;
  • }
  • actions
  • {
  • Press Button(Event Player, Button(Jump));
  • Wait(0.500, Ignore Condition);
  • Press Button(Event Player, Button(Jump));
  • }
  • }
  • rule("[Aiming] [Doomfist] - Movement control")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 2;
  • Doomfist;
  • }
  • conditions
  • {
  • Global.chosenTraining == 1;
  • Is Dummy Bot(Event Player) == True;
  • }
  • actions
  • {
  • "Change Throttle direction"
  • Call Subroutine(ChangeDirection);
  • "Use abilities"
  • If(Event Player.botState == 0 && !Is Firing Secondary(Event Player) && !Is Using Ability 1(Event Player) && !Is Using Ability 2(
  • Event Player));
  • Event Player.botState = Random Integer(1, 3);
  • End;
  • Wait(0.500, Abort When False);
  • Loop If Condition Is True;
  • }
  • }
  • rule("[Aiming] [Doomfist] - Abilities control")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 2;
  • Doomfist;
  • }
  • conditions
  • {
  • Global.chosenTraining == 1;
  • Is Dummy Bot(Event Player) == True;
  • Event Player.botState > 0;
  • }
  • actions
  • {
  • If(Event Player.botState == 1 && Ability Cooldown(Event Player, Button(Secondary Fire)) == 0);
  • Start Holding Button(Event Player, Button(Secondary Fire));
  • Wait(Random Integer(0.700, 1.400), Ignore Condition);
  • Stop Holding Button(Event Player, Button(Secondary Fire));
  • Else If(Event Player.botState == 2 && Ability Cooldown(Event Player, Button(Ability 1)) == 0);
  • Press Button(Event Player, Button(Ability 1));
  • Else If(Event Player.botState == 3 && Ability Cooldown(Event Player, Button(Ability 2)) == 0);
  • Press Button(Event Player, Button(Ability 2));
  • End;
  • Wait(0.250, Ignore Condition);
  • Event Player.botState = 0;
  • }
  • }
  • rule("[Aiming] [Lucio] - Movement control")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 2;
  • Lúcio;
  • }
  • conditions
  • {
  • Global.chosenTraining == 1;
  • Is Dummy Bot(Event Player) == True;
  • }
  • actions
  • {
  • "Change Throttle direction"
  • Call Subroutine(ChangeDirection);
  • "Jump and Crouch"
  • If(Is On Ground(Event Player));
  • Start Rule(JumpAndCrouch, Do Nothing);
  • End;
  • "Use amp it up"
  • If(Ability Cooldown(Event Player, Button(Ability 2)) == 0 && !Is Using Ability 2(Event Player));
  • Press Button(Event Player, Button(Ability 2));
  • End;
  • "Change to speed song"
  • If(Normalized Health(Event Player) >= 1 && !Is In Alternate Form(Event Player));
  • Press Button(Event Player, Button(Ability 1));
  • "Change to heal song"
  • Else If(Normalized Health(Event Player) < 0.800 && Is In Alternate Form(Event Player));
  • Press Button(Event Player, Button(Ability 1));
  • End;
  • "Use boop"
  • If(Ability Cooldown(Event Player, Button(Secondary Fire)) == 0 && !Is Using Ability 2(Event Player) && Distance Between(
  • Event Player, Players In Slot(0, Team 1)) < 8);
  • Press Button(Event Player, Button(Secondary Fire));
  • End;
  • Wait(0.500, Abort When False);
  • Loop If Condition Is True;
  • }
  • }
  • rule("[Aiming] [Echo] - Movement control")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 2;
  • Echo;
  • }
  • conditions
  • {
  • Global.chosenTraining == 1;
  • Is Dummy Bot(Event Player) == True;
  • }
  • actions
  • {
  • "Change Throttle direction"
  • Call Subroutine(ChangeDirection);
  • "Use flight when ready"
  • If(Ability Cooldown(Event Player, Button(Ability 1)) == 0 && !Is Using Ability 1(Event Player));
  • "Random facing when player is using ability"
  • Start Facing(Event Player, Event Player.botFacing, 360, To World, Direction and Turn Rate);
  • Press Button(Event Player, Button(Ability 1));
  • Wait(0.500, Abort When False);
  • Start Holding Button(Event Player, Button(Jump));
  • "Change facing direction throughout "
  • While(Is Using Ability 1(Event Player));
  • Event Player.botFacing = Vector(Random Real(-1, 1), Random Real(0, 0.750), Random Real(-1, 1));
  • Event Player.botThrottle = Vector(Random Real(-1, 1), 0, 1);
  • Wait(0.500, Abort When False);
  • End;
  • "Start facing player"
  • Start Facing(Event Player, Direction Towards(Eye Position(Event Player), Event Player.botFacingOffset + Eye Position(
  • Players In Slot(0, Team 1))), 100, To World, Direction and Turn Rate);
  • End;
  • "Stop gliding"
  • If(Is On Ground(Event Player) && !Is Using Ability 1(Event Player));
  • Stop Holding Button(Event Player, Button(Jump));
  • End;
  • Wait(0.500, Abort When False);
  • Loop If Condition Is True;
  • }
  • }
  • rule("[Aiming] [Pharah] - Movement control")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 2;
  • Pharah;
  • }
  • conditions
  • {
  • Global.chosenTraining == 1;
  • Is Dummy Bot(Event Player) == True;
  • }
  • actions
  • {
  • "Change Throttle direction"
  • Call Subroutine(ChangeDirection);
  • "Use jump jet when ready"
  • If(Ability Cooldown(Event Player, Button(Ability 1)) == 0 && Altitude Of(Event Player) < 10);
  • Press Button(Event Player, Button(Ability 1));
  • End;
  • "Use concussion blast"
  • If(Ability Cooldown(Event Player, Button(Ability 2)) == 0);
  • Press Button(Event Player, Button(Ability 2));
  • End;
  • "Use weapon"
  • Press Button(Event Player, Button(Primary Fire));
  • Wait(0.500, Abort When False);
  • Loop If Condition Is True;
  • }
  • }
  • rule("[Aiming] [Pharah] - Hover control")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 2;
  • Pharah;
  • }
  • conditions
  • {
  • Global.chosenTraining == 1;
  • Is Dummy Bot(Event Player) == True;
  • Is In Air(Event Player) == True;
  • }
  • actions
  • {
  • "Hover"
  • Start Holding Button(Event Player, Button(Jump));
  • Wait(Random Real(0.250, 1), Ignore Condition);
  • Stop Holding Button(Event Player, Button(Jump));
  • Wait(0.500, Abort When False);
  • Loop If Condition Is True;
  • }
  • }
  • rule("[Aiming] [Widow] - Movement control")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 2;
  • Widowmaker;
  • }
  • conditions
  • {
  • Global.chosenTraining == 1;
  • Is Dummy Bot(Event Player) == True;
  • }
  • actions
  • {
  • "Change Throttle direction"
  • Call Subroutine(ChangeDirection);
  • "Jump and Crouch"
  • If(Is On Ground(Event Player));
  • Start Rule(JumpAndCrouch, Do Nothing);
  • End;
  • "Use grappling hook when ready"
  • If(Ability Cooldown(Event Player, Button(Ability 1)) == 0);
  • Stop Holding Button(Event Player, Button(Secondary Fire));
  • Start Facing(Event Player, Vector(Random Real(-1, 1), Random Real(-0.250, -0.100), Random Real(-1, 1)), 360, To World,
  • Direction and Turn Rate);
  • Wait(0.250, Ignore Condition);
  • Press Button(Event Player, Button(Ability 1));
  • Wait(0.250, Ignore Condition);
  • "Start facing player"
  • Start Facing(Event Player, Direction Towards(Eye Position(Event Player), Event Player.botFacingOffset + Eye Position(
  • Players In Slot(0, Team 1))), 100, To World, Direction and Turn Rate);
  • End;
  • Wait(0.250, Abort When False);
  • "Use scope"
  • If(!Is Firing Secondary(Event Player));
  • Start Holding Button(Event Player, Button(Secondary Fire));
  • End;
  • Wait(Random Real(0.600, 0.900), Abort When False);
  • "Fire weapon"
  • Press Button(Event Player, Button(Primary Fire));
  • Wait(0.500, Abort When False);
  • Loop If Condition Is True;
  • }
  • }
  • rule("[Aiming] [Ashe] - Movement control")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 2;
  • Ashe;
  • }
  • conditions
  • {
  • Global.chosenTraining == 1;
  • Is Dummy Bot(Event Player) == True;
  • }
  • actions
  • {
  • "Change Throttle direction"
  • Call Subroutine(ChangeDirection);
  • "Jump and Crouch"
  • If(Is On Ground(Event Player));
  • Start Rule(JumpAndCrouch, Do Nothing);
  • End;
  • "Refill ammo"
  • If(Ammo(Event Player, 0) == 0);
  • Set Ammo(Event Player, 0, Max Ammo(Event Player, 0));
  • End;
  • "Use coach gun when ready"
  • If(Ability Cooldown(Event Player, Button(Ability 1)) == 0);
  • Stop Holding Button(Event Player, Button(Secondary Fire));
  • Start Facing(Event Player, Vector(Random Real(-1, 1), Random Real(-1, 0), Random Real(-1, 1)), 360, To World,
  • Direction and Turn Rate);
  • Wait(0.250, Ignore Condition);
  • Press Button(Event Player, Button(Ability 1));
  • Wait(0.250, Ignore Condition);
  • "Start facing player"
  • Start Facing(Event Player, Direction Towards(Eye Position(Event Player), Event Player.botFacingOffset + Eye Position(
  • Players In Slot(0, Team 1))), 100, To World, Direction and Turn Rate);
  • End;
  • "Use hipfire"
  • If(Event Player.botState == 0);
  • If(Is Firing Secondary(Event Player));
  • Stop Holding Button(Event Player, Button(Secondary Fire));
  • End;
  • "Fire weapon"
  • Press Button(Event Player, Button(Primary Fire));
  • Wait(0.250, Abort When False);
  • Press Button(Event Player, Button(Primary Fire));
  • Wait(0.250, Abort When False);
  • "Use scope"
  • Else;
  • If(!Is Firing Secondary(Event Player));
  • Start Holding Button(Event Player, Button(Secondary Fire));
  • Wait(0.250, Abort When False);
  • End;
  • "Fire weapon"
  • Press Button(Event Player, Button(Primary Fire));
  • Wait(0.700, Abort When False);
  • End;
  • Loop If Condition Is True;
  • }
  • }
  • rule("[Aiming] [Ashe] - Scope/unscope control")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 2;
  • Ashe;
  • }
  • conditions
  • {
  • Global.chosenTraining == 1;
  • Is Dummy Bot(Event Player) == True;
  • }
  • actions
  • {
  • Event Player.botState = Random Integer(0, 1);
  • Wait(Random Real(1, 3), Abort When False);
  • Loop If Condition Is True;
  • }
  • }
  • rule("[Aiming] [Mei] - Movement control")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 2;
  • Mei;
  • }
  • conditions
  • {
  • Global.chosenTraining == 1;
  • Is Dummy Bot(Event Player) == True;
  • }
  • actions
  • {
  • "Change Throttle direction"
  • Call Subroutine(ChangeDirection);
  • "Jump and Crouch"
  • If(Is On Ground(Event Player));
  • Start Rule(JumpAndCrouch, Do Nothing);
  • End;
  • "Use cryofreeze when ready"
  • If(Ability Cooldown(Event Player, Button(Ability 1)) == 0 && Normalized Health(Event Player) < 0.500 && !Is Using Ability 1(
  • Event Player));
  • Stop Holding Button(Event Player, Button(Secondary Fire));
  • Stop Holding Button(Event Player, Button(Primary Fire));
  • Press Button(Event Player, Button(Ability 1));
  • End;
  • Wait(0.250, Abort When False);
  • "Use primary fire"
  • If(Distance Between(Event Player, Players In Slot(0, Team 1)) < 10 && !Has Status(Players In Slot(0, Team 1), Frozen)
  • && !Is Firing Primary(Event Player) && !Is Using Ability 1(Event Player));
  • Stop Holding Button(Event Player, Button(Secondary Fire));
  • Start Holding Button(Event Player, Button(Primary Fire));
  • End;
  • "Use secondary fire"
  • If((Distance Between(Event Player, Players In Slot(0, Team 1)) >= 10 || Has Status(Players In Slot(0, Team 1), Frozen))
  • && !Is Firing Secondary(Event Player) && !Is Using Ability 1(Event Player));
  • Stop Holding Button(Event Player, Button(Primary Fire));
  • Start Holding Button(Event Player, Button(Secondary Fire));
  • End;
  • Wait(0.500, Abort When False);
  • Loop If Condition Is True;
  • }
  • }
  • rule("[Aiming] [Subroutine] - Change throttle and facing direction")
  • {
  • event
  • {
  • Subroutine;
  • ChangeDirection;
  • }
  • actions
  • {
  • "Change movement direction"
  • If(Distance Between(Position Of(Event Player), Vector(0, Y Component Of(Position Of(Event Player)), 0)) <= 18);
  • Event Player.botThrottle = Vector(Random Real(-1, 1), 0, Random Real(-1, 1));
  • Else;
  • Event Player.botThrottle = Local Vector Of(Direction Towards(Position Of(Event Player), Vector(Random Real(-15, 15), 0,
  • Random Real(-15, 15))), Event Player, Rotation);
  • End;
  • Event Player.botFacingOffset = Vector(Random Real(Global.botAimingAccuracy * -1, Global.botAimingAccuracy), Random Real(
  • Global.botAimingAccuracy * -1, Global.botAimingAccuracy), Random Real(Global.botAimingAccuracy * -1,
  • Global.botAimingAccuracy));
  • }
  • }
  • rule("[Aiming] [Subroutine] - Jumping/Crouching Control")
  • {
  • event
  • {
  • Subroutine;
  • JumpAndCrouch;
  • }
  • actions
  • {
  • If(Random Integer(0, 1) == 0 && Hero Of(Event Player) != Hero(Widowmaker));
  • Press Button(Event Player, Button(Jump));
  • Else;
  • Start Holding Button(Event Player, Button(Crouch));
  • Wait(Random Integer(0.250, 0.750), Ignore Condition);
  • Stop Holding Button(Event Player, Button(Crouch));
  • End;
  • }
  • }
  • rule("[Aiming] - Bot died")
  • {
  • event
  • {
  • Player Died;
  • All;
  • All;
  • }
  • conditions
  • {
  • Global.chosenTraining == 1;
  • Is Dummy Bot(Event Player) == True;
  • }
  • actions
  • {
  • Stop Facing(Event Player);
  • Stop Throttle In Direction(Event Player);
  • }
  • }
  • disabled rule("---- Aim Training Modifiers -----")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • }
  • rule("[Aiming Modifiers] - Enable modifiers")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 1;
  • Slot 0;
  • }
  • conditions
  • {
  • Global.chosenTraining == 1;
  • Is Button Held(Event Player, Button(Melee)) == True;
  • Global.isUIHidden == False;
  • Is True For Any(Global.aimingModifier_ButtonPos, Distance Between(Current Array Element, Ray Cast Hit Position(Eye Position(
  • Event Player), Eye Position(Event Player) + Facing Direction Of(Event Player) * Distance Between(Eye Position(Event Player),
  • Current Array Element), Null, Event Player, True)) <= 1) == True;
  • }
  • actions
  • {
  • Wait(0.500, Abort When False);
  • "Find the modifier that is selected"
  • Global.controlIndex = Index Of Array Value(Global.aimingModifier_ButtonPos, First Of(Sorted Array(Filtered Array(
  • Global.aimingModifier_ButtonPos, Distance Between(Current Array Element, Ray Cast Hit Position(Eye Position(Event Player),
  • Eye Position(Event Player) + Facing Direction Of(Event Player) * Distance Between(Eye Position(Event Player),
  • Current Array Element), Null, Event Player, True)) <= 1), Distance Between(Eye Position(Event Player),
  • Current Array Element))));
  • Abort If(Global.controlIndex == -1);
  • "if the selected modifier is not active"
  • If(Global.aimingModifier_isEnabled[Global.controlIndex] == False);
  • disabled Small Message(All Players(Team 1), Custom String("{0}: {1}", Global.aimingModifier_ButtonTexts[Global.controlIndex], Icon String(
  • Checkmark)));
  • Play Effect(Event Player, Buff Explosion Sound, Color(White), Event Player, 100);
  • Global.aimingModifier_isEnabled[Global.controlIndex] = True;
  • Else;
  • disabled Small Message(All Players(Team 1), Custom String("{0}: {1}", Global.aimingModifier_ButtonTexts[Global.controlIndex], Icon String(
  • X)));
  • Play Effect(Event Player, Ring Explosion Sound, Color(White), Event Player, 100);
  • Global.aimingModifier_isEnabled[Global.controlIndex] = False;
  • End;
  • }
  • }
  • rule("[Aiming Modifiers] [More HP] Give enemy bots more HP")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Global.chosenTraining == 1;
  • Global.aimingModifier_isEnabled[0] == True;
  • }
  • actions
  • {
  • Set Max Health(All Players(Team 2), 1000);
  • Wait(0.100, Ignore Condition);
  • Heal(All Players(Team 2), Null, 10000);
  • }
  • }
  • rule("[Aiming Modifiers] [More HP] Disable")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Global.chosenTraining == 1;
  • Global.aimingModifier_isEnabled[0] == False;
  • }
  • actions
  • {
  • Set Max Health(All Players(Team 2), 100);
  • }
  • }
  • rule("[Aiming Modifiers] [Enemy Mercy] Spawn enemy Mercy")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Global.chosenTraining == 1;
  • Global.aimingModifier_isEnabled[1] == True;
  • }
  • actions
  • {
  • "Despawns the old one bot that will be replaced"
  • If(Global.multipleBots && Entity Exists(Players In Slot(5, Team 2)));
  • Global.trainingButton_isEnabled[Index Of Array Value(Global.aiming_EnemyHeroes, Hero Of(Players In Slot(5, Team 2)))] = False;
  • End;
  • Create Dummy Bot(Hero(Mercy), Team 2, 5, Vector(0, 0, 0), Vector(0, 0, 0));
  • }
  • }
  • rule("[Aiming Modifiers] [Enemy Mercy] Disable")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Global.chosenTraining == 1;
  • Global.aimingModifier_isEnabled[1] == False;
  • }
  • actions
  • {
  • Destroy Dummy Bot(Team 2, 5);
  • }
  • }
  • rule("[Aiming Modifiers] [Enemy Mercy] Init enemy Mercy")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 2;
  • Mercy;
  • }
  • conditions
  • {
  • Global.chosenTraining == 1;
  • Is Dummy Bot(Event Player) == True;
  • Is Alive(Event Player) == True;
  • }
  • actions
  • {
  • "Start moving"
  • Start Throttle In Direction(Event Player, Event Player.botThrottle, 1, To Player, Replace existing throttle,
  • Direction and Magnitude);
  • "Start facing "
  • Start Facing(Event Player, Direction Towards(Eye Position(Event Player), Event Player.botFacingOffset + Eye Position(
  • Random Value In Array(Remove From Array(All Players(Team 2), Event Player)))), 180, To World, Direction and Turn Rate);
  • "Set to staff"
  • Set Weapon(Event Player, 1);
  • "For GA"
  • Start Holding Button(Event Player, Button(Jump));
  • "More HP if the mode has more nemey health enabled"
  • If(Global.aimingModifier_isEnabled[0]);
  • Set Max Health(Event Player, 1000);
  • Wait(0.100, Ignore Condition);
  • Set Player Health(Event Player, Max Health(Event Player));
  • End;
  • }
  • }
  • rule("[Aiming Modifiers] [Enemy Mercy] Use GA, heal/damage boost and move around")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 2;
  • Mercy;
  • }
  • conditions
  • {
  • Global.chosenTraining == 1;
  • Is Dummy Bot(Event Player) == True;
  • }
  • actions
  • {
  • "Change Throttle direction"
  • Call Subroutine(ChangeDirection);
  • "Holding GA"
  • If(Ability Cooldown(Event Player, Button(Ability 1)) == 0 && !Is Using Ability 1(Event Player));
  • Start Holding Button(Event Player, Button(Ability 1));
  • Wait(Random Real(1, 3), Ignore Condition);
  • Stop Holding Button(Event Player, Button(Ability 1));
  • End;
  • "Give enemy heal or damage boost"
  • If(Is True For Any(Remove From Array(All Players(Team 2), Event Player), Normalized Health(Current Array Element) <= 0.800)
  • && !Is Button Held(Event Player, Button(Primary Fire)));
  • "Heal the lowest HP player"
  • Start Facing(Event Player, Direction Towards(Eye Position(Event Player), Event Player.botFacingOffset + Eye Position(First Of(
  • Sorted Array(Remove From Array(All Players(Team 2), Event Player), Normalized Health(Current Array Element))))), 180, To World,
  • Direction and Turn Rate);
  • Stop Holding Button(Event Player, Button(Secondary Fire));
  • Wait(0.250, Ignore Condition);
  • Start Holding Button(Event Player, Button(Primary Fire));
  • Else If(Is True For All(Remove From Array(All Players(Team 2), Event Player), Normalized Health(Current Array Element) > 0.800)
  • && !Is Button Held(Event Player, Button(Secondary Fire)));
  • "Damage boost a random player"
  • Start Facing(Event Player, Direction Towards(Eye Position(Event Player), Event Player.botFacingOffset + Eye Position(
  • Random Value In Array(Remove From Array(All Players(Team 2), Event Player)))), 180, To World, Direction and Turn Rate);
  • Stop Holding Button(Event Player, Button(Primary Fire));
  • Wait(0.250, Ignore Condition);
  • Start Holding Button(Event Player, Button(Secondary Fire));
  • End;
  • Wait(0.500, Abort When False);
  • Loop If Condition Is True;
  • }
  • }
  • rule("[Aiming Modifiers] [Enemy Mercy] If enemy is still low HP, re-attach the beam")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 2;
  • Mercy;
  • }
  • conditions
  • {
  • Global.chosenTraining == 1;
  • Is Dummy Bot(Event Player) == True;
  • Is Button Held(Event Player, Button(Primary Fire)) == True;
  • }
  • actions
  • {
  • Wait(3, Abort When False);
  • Stop Holding Button(Event Player, Button(Primary Fire));
  • }
  • }
  • rule("[Aiming Modifiers] [Invincible] Give player unkillable")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Global.chosenTraining == 1;
  • Global.aimingModifier_isEnabled[2] == True;
  • }
  • actions
  • {
  • Set Status(Players In Slot(0, Team 1), Null, Unkillable, 9999);
  • }
  • }
  • rule("[Aiming Modifiers] [Invincible] Disable")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Global.chosenTraining == 1;
  • Global.aimingModifier_isEnabled[2] == False;
  • }
  • actions
  • {
  • Clear Status(Players In Slot(0, Team 1), Unkillable);
  • }
  • }
  • rule("[Aiming Modifiers] [Ally Mercy] Spawn ally Mercy")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Global.chosenTraining == 1;
  • Global.aimingModifier_isEnabled[3] == True;
  • }
  • actions
  • {
  • Create Dummy Bot(Hero(Mercy), Team 1, 1, Vector(0, 0, 0), Vector(0, 0, 0));
  • }
  • }
  • rule("[Aiming Modifiers] [Ally Mercy] Disable")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Global.chosenTraining == 1;
  • Global.aimingModifier_isEnabled[3] == False;
  • }
  • actions
  • {
  • Destroy Dummy Bot(Team 1, 1);
  • }
  • }
  • rule("[Aiming Modifiers] [Ally Mercy] Init ally Mercy")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 1;
  • Mercy;
  • }
  • conditions
  • {
  • Global.chosenTraining == 1;
  • Is Dummy Bot(Event Player) == True;
  • Is Alive(Event Player) == True;
  • }
  • actions
  • {
  • "Start moving"
  • Start Throttle In Direction(Event Player, Event Player.botThrottle, 1, To Player, Replace existing throttle,
  • Direction and Magnitude);
  • "Start facing player"
  • Start Facing(Event Player, Direction Towards(Eye Position(Event Player), Event Player.botFacingOffset + Eye Position(
  • Players In Slot(0, Team 1))), 180, To World, Direction and Turn Rate);
  • "Set to staff"
  • Set Weapon(Event Player, 1);
  • "For GA"
  • Start Holding Button(Event Player, Button(Jump));
  • }
  • }
  • rule("[Aiming Modifiers] [Ally Mercy] Use GA, heal/damage boost and move around")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 1;
  • Mercy;
  • }
  • conditions
  • {
  • Global.chosenTraining == 1;
  • Is Dummy Bot(Event Player) == True;
  • }
  • actions
  • {
  • "Change Throttle direction"
  • Call Subroutine(ChangeDirection);
  • "Holding GA"
  • If(Ability Cooldown(Event Player, Button(Ability 1)) == 0 && !Is Using Ability 1(Event Player));
  • Start Holding Button(Event Player, Button(Ability 1));
  • Wait(Random Real(1, 3), Ignore Condition);
  • Stop Holding Button(Event Player, Button(Ability 1));
  • End;
  • "Give you heal or damage boost"
  • If(Normalized Health(Players In Slot(0, Team 1)) <= 0.800 && !Is Button Held(Event Player, Button(Primary Fire)));
  • Stop Holding Button(Event Player, Button(Secondary Fire));
  • Start Holding Button(Event Player, Button(Primary Fire));
  • Else If(Normalized Health(Players In Slot(0, Team 1)) >= 1 && !Is Button Held(Event Player, Button(Secondary Fire)));
  • Stop Holding Button(Event Player, Button(Primary Fire));
  • Start Holding Button(Event Player, Button(Secondary Fire));
  • End;
  • Wait(0.500, Abort When False);
  • Loop If Condition Is True;
  • }
  • }
  • rule("[Aiming Modifiers] [Infinite Reload]")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 1;
  • Slot 0;
  • }
  • conditions
  • {
  • Global.chosenTraining == 1;
  • Global.aimingModifier_isEnabled[4] == True;
  • "If left 10% ammo, reload"
  • Ammo(Event Player, 0) < Max Ammo(Event Player, 0) * 0.100;
  • }
  • actions
  • {
  • Set Ammo(Event Player, 0, Max Ammo(Event Player, 0));
  • }
  • }
  • rule("[Aiming Modifiers] [Middle Wall] Spawn ally Mei for the middle wall")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Global.chosenTraining == 1;
  • Global.aimingModifier_isEnabled[5] == True;
  • }
  • actions
  • {
  • Create Dummy Bot(Hero(Mei), Team 1, 2, Vector(0, 0, 0), Vector(0, 0, 0));
  • Create Dummy Bot(Hero(Mei), Team 1, 3, Vector(0, 0, 0), Vector(0, 0, 0));
  • Players In Slot(2, Team 1).botSpawnLocation = Vector(6, 20, 0);
  • Players In Slot(2, Team 1).botSpawnFacing = Vector(-0.020, -1, 0);
  • Players In Slot(3, Team 1).botSpawnLocation = Vector(6, 20, 0);
  • Players In Slot(3, Team 1).botSpawnFacing = Vector(0, -1, 0.020);
  • }
  • }
  • rule("[Aiming Modifiers] [Middle Wall] Disable")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Global.chosenTraining == 1;
  • Global.aimingModifier_isEnabled[5] == False;
  • }
  • actions
  • {
  • Destroy Dummy Bot(Team 1, 2);
  • Destroy Dummy Bot(Team 1, 3);
  • }
  • }
  • rule("[Aiming Modifiers] [Middle Wall] Init the Meis")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 1;
  • Mei;
  • }
  • conditions
  • {
  • Global.chosenTraining == 1;
  • Global.aimingModifier_isEnabled[5] == True;
  • Is Dummy Bot(Event Player) == True;
  • }
  • actions
  • {
  • Set Status(Event Player, Null, Phased Out, 9999);
  • Set Invisible(Event Player, All);
  • Wait(0.100, Ignore Condition);
  • Start Forcing Player Position(Event Player, Event Player.botSpawnLocation, False);
  • Set Facing(Event Player, Event Player.botSpawnFacing, To World);
  • }
  • }
  • rule("[Aiming Modifiers] [Middle Wall] Mei uses their walls")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Global.chosenTraining == 1;
  • Global.aimingModifier_isEnabled[5] == True;
  • }
  • actions
  • {
  • Wait(0.050, Abort When False);
  • "Prepare to use ice walls"
  • Press Button(Players In Slot(2, Team 1), Button(Ability 2));
  • Press Button(Players In Slot(3, Team 1), Button(Ability 2));
  • Wait(0.250, Abort When False);
  • "Use the ice walls"
  • Press Button(Players In Slot(2, Team 1), Button(Primary Fire));
  • Wait(0.050, Abort When False);
  • Press Button(Players In Slot(3, Team 1), Button(Primary Fire));
  • Wait Until(!Is Using Ability 2(Players In Slot(3, Team 1)), 6);
  • "Reset wall cooldown"
  • Set Ability Cooldown(Players In Slot(2, Team 1), Button(Ability 2), 0);
  • Set Ability Cooldown(Players In Slot(3, Team 1), Button(Ability 2), 0);
  • Loop If Condition Is True;
  • }
  • }
  • disabled rule("----- Reaction Training -----")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • }
  • rule("[Reaction] - Init settings")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Global.chosenTraining == 2;
  • }
  • actions
  • {
  • "Set false for the button"
  • For Global Variable(controlIndex, 0, Count Of(Global.reaction_ButtonPos), 1);
  • Global.trainingButton_isEnabled[Global.controlIndex] = False;
  • End;
  • Global.reaction_TestIsRunning = False;
  • }
  • }
  • rule("[Reaction] - Teleport player to the centre ring")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 1;
  • Slot 0;
  • }
  • conditions
  • {
  • Global.chosenTraining == 2;
  • Global.reaction_TestIsRunning == False;
  • Distance Between(Position Of(Event Player), Vector(0, Y Component Of(Position Of(Event Player)), 0)) > 4;
  • }
  • actions
  • {
  • Teleport(Event Player, Vector(0, 0, 0));
  • Small Message(Event Player, Custom String("Stay in the circle"));
  • }
  • }
  • rule("[Reaction] - Choosing Enemy")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 1;
  • Slot 0;
  • }
  • conditions
  • {
  • Global.chosenTraining == 2;
  • Is Button Held(Event Player, Button(Melee)) == True;
  • Global.isUIHidden == False;
  • Is True For Any(Global.reaction_ButtonPos, Distance Between(Current Array Element, Ray Cast Hit Position(Eye Position(
  • Event Player), Eye Position(Event Player) + Facing Direction Of(Event Player) * Distance Between(Eye Position(Event Player),
  • Current Array Element), Null, Event Player, True)) <= 1) == True;
  • }
  • actions
  • {
  • Wait(0.500, Abort When False);
  • "Find the hero that is selected"
  • Global.controlIndex = Index Of Array Value(Global.reaction_ButtonPos, First Of(Sorted Array(Filtered Array(
  • Global.reaction_ButtonPos, Distance Between(Current Array Element, Ray Cast Hit Position(Eye Position(Event Player),
  • Eye Position(Event Player) + Facing Direction Of(Event Player) * Distance Between(Eye Position(Event Player),
  • Current Array Element), Null, Event Player, True)) <= 1), Distance Between(Eye Position(Event Player),
  • Current Array Element))));
  • Abort If(Global.controlIndex == -1);
  • "if the selected hero is active"
  • If(Entity Exists(Players In Slot(0, Team 2)));
  • Global.trainingButton_isEnabled[Index Of Array Value(Global.reaction_EnemyHeroes, Hero Of(Players In Slot(0, Team 2)))] = False;
  • End;
  • "If the selected hero is the same as the active hero, despawn the bot"
  • If(Global.reaction_EnemyHeroes[Global.controlIndex] == Hero Of(Players In Slot(0, Team 2)));
  • Destroy Dummy Bot(Team 2, 0);
  • Play Effect(Event Player, Ring Explosion Sound, Color(White), Event Player, 100);
  • Abort;
  • End;
  • "Created dummy bot that is different from the active one"
  • Create Dummy Bot(Global.reaction_EnemyHeroes[Global.controlIndex], Team 2, 0, Array Contains(Global.reaction_LargerDistanceHeroes,
  • Global.reaction_EnemyHeroes[Global.controlIndex]) ? Vector(0, 0, 10) : Vector(0, 0, 5), Vector(0, 0, 0));
  • Global.trainingButton_isEnabled[Global.controlIndex] = True;
  • Play Effect(Event Player, Buff Explosion Sound, Color(White), Event Player, 100);
  • }
  • }
  • rule("[Reaction] [All] - Init the Enemies")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 2;
  • Slot 0;
  • }
  • conditions
  • {
  • Global.chosenTraining == 2;
  • }
  • actions
  • {
  • Global.reaction_TestIsRunning = False;
  • Wait(0.100, Ignore Condition);
  • Start Facing(Event Player, Direction Towards(Eye Position(Event Player), Eye Position(Players In Slot(0, Team 1))), 360, To World,
  • Direction and Turn Rate);
  • "If bot is Mercy, then spawn a Zenyatta"
  • If(Hero Of(Event Player) == Hero(Mercy));
  • "Start facing"
  • Start Facing(Event Player, Direction Towards(Eye Position(Event Player), Eye Position(Players In Slot(5, Team 2))), 100, To World,
  • Direction and Turn Rate);
  • Create Dummy Bot(Hero(Zenyatta), Team 2, 5, Vector(Random Real(-5, 5), 0, Random Real(-5, 5)), Vector(0, 0, 0));
  • Wait(1, Ignore Condition);
  • "Change mercy weapon"
  • Set Weapon(Players In Slot(0, Team 2), 1);
  • "Disable respawn for zen bot"
  • Disable Built-In Game Mode Respawning(Players In Slot(5, Team 2));
  • End;
  • "Destroy complementary bot if not mercy"
  • If(Hero Of(Event Player) != Hero(Mercy) && Entity Exists(Players In Slot(5, Team 2)));
  • Destroy Dummy Bot(Team 2, 5);
  • End;
  • }
  • }
  • rule("[Reaction] [All] - Start the reaction test")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 2;
  • Slot 0;
  • }
  • conditions
  • {
  • Global.chosenTraining == 2;
  • Global.reaction_TestIsRunning == False;
  • }
  • actions
  • {
  • Cancel Primary Action(Event Player);
  • "Rez the Zenyatta bot"
  • If(Entity Exists(Players In Slot(5, Team 2)));
  • Resurrect(Players In Slot(5, Team 2));
  • End;
  • "Reset cooldowns"
  • Set Ability Cooldown(Players In Slot(0, Team 1), Button(Secondary Fire), 0);
  • Set Ability Cooldown(Players In Slot(0, Team 1), Button(Ability 1), 0);
  • Set Ability Cooldown(Players In Slot(0, Team 1), Button(Ability 2), 0);
  • Set Ability Cooldown(Players In Slot(0, Team 1), Button(Jump), 0);
  • Set Ability Cooldown(Players In Slot(0, Team 1), Button(Crouch), 0);
  • Set Ultimate Charge(Players In Slot(0, Team 1), 100);
  • "Random wait"
  • Wait(Random Real(3, 6), Abort When False);
  • "Teleport to a random place around the circle"
  • Event Player.botSpawnLocation = Random Integer(0, 359);
  • If(Array Contains(Global.reaction_LargerDistanceHeroes, Hero Of(Event Player)));
  • Teleport(Event Player, Vector(10 * Cosine From Degrees(Event Player.botSpawnLocation), 0, 10 * Sine From Degrees(
  • Event Player.botSpawnLocation)));
  • Else;
  • Teleport(Event Player, Vector(5 * Cosine From Degrees(Event Player.botSpawnLocation), 0, 5 * Sine From Degrees(
  • Event Player.botSpawnLocation)));
  • End;
  • "Set the all players to max HP"
  • Heal(All Players(All Teams), Null, 1000);
  • Wait(0.250, Ignore Condition);
  • Set Facing(Event Player, Direction Towards(Eye Position(Event Player), Position Of(Players In Slot(0, Team 1))), To World);
  • "Start the test"
  • Global.reaction_TestIsRunning = True;
  • }
  • }
  • rule("[Reaction] [Ana] - Abilities control")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 2;
  • Ana;
  • }
  • conditions
  • {
  • Global.chosenTraining == 2;
  • Global.reaction_TestIsRunning == True;
  • }
  • actions
  • {
  • "Use sleep dart"
  • If(Random Integer(0, 1) == 0);
  • Set Ability Cooldown(Event Player, Button(Ability 1), 0);
  • Press Button(Event Player, Button(Ability 1));
  • Wait(2, Ignore Condition);
  • Clear Status(Players In Slot(0, Team 1), Asleep);
  • "Using Bionade"
  • Else;
  • Set Ability Cooldown(Event Player, Button(Ability 2), 0);
  • Press Button(Event Player, Button(Ability 2));
  • End;
  • }
  • }
  • rule("[Reaction] [Brigette] - Abilities control")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 2;
  • Brigitte;
  • }
  • conditions
  • {
  • Global.chosenTraining == 2;
  • Global.reaction_TestIsRunning == True;
  • }
  • actions
  • {
  • "Use whip shot"
  • If(Random Integer(0, 1) == 0);
  • Set Ability Cooldown(Event Player, Button(Ability 1), 0);
  • Press Button(Event Player, Button(Ability 1));
  • "Use shield bash"
  • Else;
  • Set Ability Cooldown(Event Player, Button(Primary Fire), 0);
  • Start Holding Button(Event Player, Button(Secondary Fire));
  • Press Button(Event Player, Button(Primary Fire));
  • Wait(0.250, Ignore Condition);
  • Stop Holding Button(Event Player, Button(Secondary Fire));
  • End;
  • }
  • }
  • rule("[Reaction] [Lucio] - Abilities control")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 2;
  • Lúcio;
  • }
  • conditions
  • {
  • Global.chosenTraining == 2;
  • Global.reaction_TestIsRunning == True;
  • }
  • actions
  • {
  • "Use sound barrier"
  • Set Ultimate Charge(Event Player, 100);
  • Press Button(Event Player, Button(Ultimate));
  • }
  • }
  • rule("[Reaction] [Mercy] - Abilities control")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 2;
  • Mercy;
  • }
  • conditions
  • {
  • Global.chosenTraining == 2;
  • Global.reaction_TestIsRunning == True;
  • }
  • actions
  • {
  • "Teleport Zen to a random place"
  • Teleport(Players In Slot(5, Team 2), Vector(Random Real(-5, 5), 0, Random Real(-5, 5)));
  • "Reset cooldowns"
  • Set Ability Cooldown(Event Player, Button(Ability 1), 0);
  • Set Ability Cooldown(Event Player, Button(Ability 2), 0);
  • Wait(0.500, Ignore Condition);
  • "Kill Zenyatta"
  • Kill(Players In Slot(5, Team 2), Null);
  • Wait(0.500, Ignore Condition);
  • "Use GA"
  • Start Holding Button(Event Player, Button(Ability 1));
  • Wait Until(Distance Between(Event Player, Players In Slot(5, Team 2)) < 5, 3);
  • Stop Holding Button(Event Player, Button(Ability 1));
  • Wait(0.500, Ignore Condition);
  • "Use rez"
  • Press Button(Event Player, Button(Ability 2));
  • }
  • }
  • rule("[Reaction] [Moira] - Abilities control")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 2;
  • Moira;
  • }
  • conditions
  • {
  • Global.chosenTraining == 2;
  • Global.reaction_TestIsRunning == True;
  • }
  • actions
  • {
  • "Use sound barrier"
  • Set Ultimate Charge(Event Player, 100);
  • Press Button(Event Player, Button(Ultimate));
  • }
  • }
  • rule("[Reaction] [Dva] - Abilities control")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 2;
  • D.Va;
  • }
  • conditions
  • {
  • Global.chosenTraining == 2;
  • Global.reaction_TestIsRunning == True;
  • }
  • actions
  • {
  • "Self destruct"
  • Skip If(Is In Alternate Form(Event Player), 2);
  • Set Ultimate Charge(Event Player, 100);
  • Press Button(Event Player, Button(Ultimate));
  • Wait(3, Ignore Condition);
  • "Call mech"
  • Skip If(!Is In Alternate Form(Event Player), 2);
  • Set Ultimate Charge(Event Player, 100);
  • Press Button(Event Player, Button(Ultimate));
  • }
  • }
  • rule("[Reaction] [Reinhardt] - Abilities control")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 2;
  • Reinhardt;
  • }
  • conditions
  • {
  • Global.chosenTraining == 2;
  • Global.reaction_TestIsRunning == True;
  • }
  • actions
  • {
  • "Use charge"
  • If(Random Integer(0, 1) == 0);
  • Set Ability Cooldown(Event Player, Button(Ability 1), 0);
  • Press Button(Event Player, Button(Ability 1));
  • "Use Shatter"
  • Else;
  • Set Ultimate Charge(Event Player, 100);
  • Press Button(Event Player, Button(Ultimate));
  • End;
  • }
  • }
  • rule("[Reaction] [Roadhog] - Abilities control")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 2;
  • Roadhog;
  • }
  • conditions
  • {
  • Global.chosenTraining == 2;
  • Global.reaction_TestIsRunning == True;
  • }
  • actions
  • {
  • "Hook"
  • Set Ability Cooldown(Event Player, Button(Ability 1), 0);
  • Press Button(Event Player, Button(Ability 1));
  • }
  • }
  • rule("[Reaction] [Sigma] - Abilities control")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 2;
  • Sigma;
  • }
  • conditions
  • {
  • Global.chosenTraining == 2;
  • Global.reaction_TestIsRunning == True;
  • }
  • actions
  • {
  • "Using Rock"
  • If(Random Integer(0, 1) == 0);
  • Set Ability Cooldown(Event Player, Button(Ability 2), 0);
  • Press Button(Event Player, Button(Ability 2));
  • "Using Ultimate"
  • Else;
  • Set Ultimate Charge(Event Player, 100);
  • Press Button(Event Player, Button(Ultimate));
  • Start Facing(Event Player, Direction Towards(Eye Position(Event Player), Position Of(Players In Slot(0, Team 1))), 360, To World,
  • Direction and Turn Rate);
  • Wait(Random Real(0.700, 1.500), Ignore Condition);
  • Press Button(Event Player, Button(Primary Fire));
  • Wait(1, Ignore Condition);
  • Start Facing(Event Player, Direction Towards(Eye Position(Event Player), Eye Position(Players In Slot(0, Team 1))), 360, To World,
  • Direction and Turn Rate);
  • End;
  • }
  • }
  • rule("[Reaction] [Wrecking Ball] - Abilities control")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 2;
  • Wrecking Ball;
  • }
  • conditions
  • {
  • Global.chosenTraining == 2;
  • Global.reaction_TestIsRunning == True;
  • }
  • actions
  • {
  • "Use piledriver"
  • Set Ability Cooldown(Event Player, Button(Crouch), 0);
  • Teleport(Event Player, Position Of(Event Player) + Vector(0, 10, 0));
  • Wait(0.100, Ignore Condition);
  • Press Button(Event Player, Button(Crouch));
  • }
  • }
  • rule("[Reaction] [Zarya] - Abilities control")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 2;
  • Zarya;
  • }
  • conditions
  • {
  • Global.chosenTraining == 2;
  • Global.reaction_TestIsRunning == True;
  • }
  • actions
  • {
  • "Use grav"
  • Set Ultimate Charge(Event Player, 100);
  • Press Button(Event Player, Button(Ultimate));
  • }
  • }
  • rule("[Reaction] [Ashe] - Abilities control")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 2;
  • Ashe;
  • }
  • conditions
  • {
  • Global.chosenTraining == 2;
  • Global.reaction_TestIsRunning == True;
  • }
  • actions
  • {
  • "Use Dynamite"
  • If(Random Integer(0, 1) == 0);
  • Set Ability Cooldown(Event Player, Button(Ability 1), 0);
  • Press Button(Event Player, Button(Ability 1));
  • "Use Coach Gun"
  • Else;
  • Set Ability Cooldown(Event Player, Button(Ability 2), 0);
  • Press Button(Event Player, Button(Ability 2));
  • End;
  • }
  • }
  • rule("[Reaction] [Bastion] - Abilities control")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 2;
  • Bastion;
  • }
  • conditions
  • {
  • Global.chosenTraining == 2;
  • Global.reaction_TestIsRunning == True;
  • }
  • actions
  • {
  • "Use sound barrier"
  • Set Ultimate Charge(Event Player, 100);
  • Press Button(Event Player, Button(Ultimate));
  • Start Holding Button(Event Player, Button(Primary Fire));
  • Wait(4, Ignore Condition);
  • Stop Holding Button(Event Player, Button(Primary Fire));
  • "Stop using ultimate"
  • Kill(Event Player, Null);
  • }
  • }
  • rule("[Reaction] [Doomfist] - Abilities control")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 2;
  • Doomfist;
  • }
  • conditions
  • {
  • Global.chosenTraining == 2;
  • Global.reaction_TestIsRunning == True;
  • }
  • actions
  • {
  • "Rocket Punch"
  • If(Random Integer(0, 1) == 0);
  • Set Ability Cooldown(Event Player, Button(Secondary Fire), 0);
  • Start Holding Button(Event Player, Button(Secondary Fire));
  • Wait(Random Real(0.300, 0.500), Ignore Condition);
  • Stop Holding Button(Event Player, Button(Secondary Fire));
  • "Meteor Strike"
  • Else;
  • Set Ultimate Charge(Event Player, 100);
  • Press Button(Event Player, Button(Ultimate));
  • Wait(Random Real(1, 3), Ignore Condition);
  • Teleport(Event Player, Players In Slot(0, Team 1));
  • Press Button(Event Player, Button(Primary Fire));
  • End;
  • }
  • }
  • rule("[Reaction] [Genji] - Abilities control")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 2;
  • Genji;
  • }
  • conditions
  • {
  • Global.chosenTraining == 2;
  • Global.reaction_TestIsRunning == True;
  • }
  • actions
  • {
  • Set Ultimate Charge(Event Player, 100);
  • Press Button(Event Player, Button(Ultimate));
  • Start Facing(Event Player, Direction Towards(Eye Position(Event Player), Eye Position(Players In Slot(0, Team 1))), 360, To World,
  • Direction and Turn Rate);
  • Start Holding Button(Event Player, Button(Primary Fire));
  • Wait(0.500, Ignore Condition);
  • "Use dash"
  • While(Is Using Ultimate(Event Player));
  • Set Ability Cooldown(Event Player, Button(Ability 1), 0);
  • Press Button(Event Player, Button(Ability 1));
  • Wait(1, Ignore Condition);
  • End;
  • "Start facing player"
  • Start Facing(Event Player, Direction Towards(Eye Position(Event Player), Event Player.botFacingOffset + Eye Position(
  • Players In Slot(0, Team 1))), 100, To World, Direction and Turn Rate);
  • Stop Holding Button(Event Player, Button(Primary Fire));
  • }
  • }
  • rule("[Reaction] [Hanzo] - Abilities control")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 2;
  • Hanzo;
  • }
  • conditions
  • {
  • Global.chosenTraining == 2;
  • Global.reaction_TestIsRunning == True;
  • }
  • actions
  • {
  • "Storm Arrow"
  • If(Random Integer(0, 1) == 0);
  • Set Ability Cooldown(Event Player, Button(Ability 2), 0);
  • Press Button(Event Player, Button(Ability 2));
  • Wait(0.500, Ignore Condition);
  • "Use arrows"
  • While(Is Using Ability 2(Event Player));
  • Press Button(Event Player, Button(Primary Fire));
  • Wait(0.500, Ignore Condition);
  • End;
  • "Dragonstrike"
  • Else;
  • Set Ultimate Charge(Event Player, 100);
  • Press Button(Event Player, Button(Ultimate));
  • End;
  • }
  • }
  • rule("[Reaction] [Junkrat] - Abilities control")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 2;
  • Junkrat;
  • }
  • conditions
  • {
  • Global.chosenTraining == 2;
  • Global.reaction_TestIsRunning == True;
  • }
  • actions
  • {
  • "Concussion mine"
  • If(Random Integer(0, 1) == 0);
  • Set Ability Cooldown(Event Player, Button(Ability 1), 0);
  • Press Button(Event Player, Button(Ability 1));
  • Wait(0.600, Ignore Condition);
  • Press Button(Event Player, Button(Secondary Fire));
  • "Rip Tire"
  • Else;
  • Set Ultimate Charge(Event Player, 100);
  • Press Button(Event Player, Button(Ultimate));
  • Wait(2, Ignore Condition);
  • Press Button(Event Player, Button(Primary Fire));
  • End;
  • }
  • }
  • rule("[Reaction] [Mccree] - Abilities control")
  • rule("[Reaction] [Cassidy] - Abilities control")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 2;
  • McCree;
  • Cassidy;
  • }
  • conditions
  • {
  • Global.chosenTraining == 2;
  • Global.reaction_TestIsRunning == True;
  • }
  • actions
  • {
  • "Flash bang"
  • If(Random Integer(0, 1) == 0);
  • Set Ability Cooldown(Event Player, Button(Ability 2), 0);
  • Press Button(Event Player, Button(Ability 2));
  • "Deadeye"
  • Else;
  • Set Ultimate Charge(Event Player, 100);
  • Press Button(Event Player, Button(Ultimate));
  • Wait(Random Real(1.500, 4.500), Ignore Condition);
  • Press Button(Event Player, Button(Primary Fire));
  • End;
  • }
  • }
  • rule("[Reaction] [Mei] - Abilities control")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 2;
  • Mei;
  • }
  • conditions
  • {
  • Global.chosenTraining == 2;
  • Global.reaction_TestIsRunning == True;
  • }
  • actions
  • {
  • "Use ult"
  • Set Ultimate Charge(Event Player, 100);
  • Press Button(Event Player, Button(Ultimate));
  • }
  • }
  • rule("[Reaction] [Pharah] - Abilities control")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 2;
  • Pharah;
  • }
  • conditions
  • {
  • Global.chosenTraining == 2;
  • Global.reaction_TestIsRunning == True;
  • }
  • actions
  • {
  • "Concussion Blast"
  • If(Random Integer(0, 1) == 0);
  • Set Ability Cooldown(Event Player, Button(Ability 2), 0);
  • Press Button(Event Player, Button(Ability 2));
  • "Barrage"
  • Else;
  • Set Ultimate Charge(Event Player, 100);
  • Press Button(Event Player, Button(Ultimate));
  • End;
  • }
  • }
  • rule("[Reaction] [Reaper] - Abilities control")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 2;
  • Reaper;
  • }
  • conditions
  • {
  • Global.chosenTraining == 2;
  • Global.reaction_TestIsRunning == True;
  • }
  • actions
  • {
  • "Shadow Step"
  • If(Random Integer(0, 1) == 0);
  • Set Ability Cooldown(Event Player, Button(Ability 2), 0);
  • Press Button(Event Player, Button(Ability 2));
  • Start Facing(Event Player, Direction Towards(Eye Position(Event Player), Vector(0, 0, 0)), 360, To World, Direction and Turn Rate);
  • Wait(Random Real(0, 1), Ignore Condition);
  • Press Button(Event Player, Button(Primary Fire));
  • "Start facing player"
  • Start Facing(Event Player, Direction Towards(Eye Position(Event Player), Event Player.botFacingOffset + Eye Position(
  • Players In Slot(0, Team 1))), 100, To World, Direction and Turn Rate);
  • "Death Blossom"
  • Else;
  • Set Ultimate Charge(Event Player, 100);
  • Press Button(Event Player, Button(Ultimate));
  • End;
  • }
  • }
  • rule("[Reaction] [Sombra] - Abilities control")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 2;
  • Sombra;
  • }
  • conditions
  • {
  • Global.chosenTraining == 2;
  • Global.reaction_TestIsRunning == True;
  • }
  • actions
  • {
  • "Use Hack"
  • If(Random Integer(0, 1) == 0);
  • Set Ability Cooldown(Event Player, Button(Secondary Fire), 0);
  • Start Holding Button(Event Player, Button(Secondary Fire));
  • Wait(1, Ignore Condition);
  • Stop Holding Button(Event Player, Button(Secondary Fire));
  • "Use EMP"
  • Else;
  • Set Ultimate Charge(Event Player, 100);
  • Press Button(Event Player, Button(Ultimate));
  • End;
  • }
  • }
  • rule("[Reaction] [Tracer] - Abilities control")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 2;
  • Tracer;
  • }
  • conditions
  • {
  • Global.chosenTraining == 2;
  • Global.reaction_TestIsRunning == True;
  • }
  • actions
  • {
  • "Use pulse bomb"
  • Set Ultimate Charge(Event Player, 100);
  • Press Button(Event Player, Button(Ultimate));
  • }
  • }
  • rule("[Reaction] [Failed] If received any form of damage, fail the test")
  • {
  • event
  • {
  • Player Took Damage;
  • Team 1;
  • Slot 0;
  • }
  • conditions
  • {
  • Global.chosenTraining == 2;
  • Global.reaction_TestIsRunning == True;
  • }
  • actions
  • {
  • "Do not consider fail if hit but pulse bomb initial damage"
  • Abort If(Hero Of(Players In Slot(0, Team 2)) == Hero(Tracer) && Event Ability == Button(Ultimate));
  • "Failed"
  • Small Message(Event Player, String("Failed"));
  • Wait(1, Ignore Condition);
  • }
  • }
  • rule("[Reaction] [Failed] If received hacked, fail the test")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 1;
  • Slot 0;
  • }
  • conditions
  • {
  • Global.chosenTraining == 2;
  • Global.reaction_TestIsRunning == True;
  • Has Status(Event Player, Hacked) == True;
  • }
  • actions
  • {
  • Abort If(Is Using Ability 1(Event Player));
  • "Failed"
  • Small Message(Event Player, String("Failed"));
  • }
  • }
  • rule("[Reaction] [Failed] If received knockback from pharah, fail the test")
  • {
  • event
  • {
  • Player Received Knockback;
  • Team 1;
  • Slot 0;
  • }
  • conditions
  • {
  • Global.chosenTraining == 2;
  • Global.reaction_TestIsRunning == True;
  • Hero Of(Players In Slot(0, Team 2)) == Hero(Pharah);
  • }
  • actions
  • {
  • "Failed"
  • Small Message(Event Player, String("Failed"));
  • }
  • }
  • rule("[Reaction] - Reset after 5s")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Global.chosenTraining == 2;
  • Entity Exists(Players In Slot(False, Team 2)) == True;
  • Global.reaction_TestIsRunning == True;
  • }
  • actions
  • {
  • Wait(5, Abort When False);
  • Global.reaction_TestIsRunning = False;
  • }
  • }
  • rule("[Reaction] - Respawn dead bots and player")
  • {
  • event
  • {
  • Player Died;
  • All;
  • Slot 0;
  • }
  • conditions
  • {
  • Global.chosenTraining == 2;
  • }
  • actions
  • {
  • Wait(0.100, Ignore Condition);
  • Resurrect(Event Player);
  • }
  • }
  • disabled rule("----- Miscellaneous Functions -----")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • }
  • rule("[All modes] Hold interact for 2s to go back to main menu")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 1;
  • Slot 0;
  • }
  • conditions
  • {
  • Is Button Held(Event Player, Button(Interact)) == True;
  • Global.chosenTraining >= 1;
  • }
  • actions
  • {
  • Small Message(Event Player, Custom String("Returning to Main Menu, Hold [{0}] for 2 seconds.", Input Binding String(Button(
  • Interact))));
  • Wait(2, Abort When False);
  • "Set state to 0"
  • Global.chosenTraining = 0;
  • }
  • }
  • rule("[All modes] Pressing hide UI buttons")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 1;
  • Slot 0;
  • }
  • conditions
  • {
  • Global.chosenTraining >= 1;
  • Is Button Held(Event Player, Button(Melee)) == True;
  • Distance Between(Global.hideUIButton, Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)
  • + Facing Direction Of(Event Player) * Distance Between(Eye Position(Event Player), Global.hideUIButton), Null, Event Player,
  • True)) <= 1;
  • "Prevent players from overlapping selection of training bots and back button"
  • X Component Of(Position Of(Event Player)) >= -16;
  • }
  • actions
  • {
  • Wait(0.500, Abort When False);
  • "if the selected modifier is not active"
  • If(Global.isUIHidden);
  • Play Effect(Event Player, Ring Explosion Sound, Color(White), Event Player, 100);
  • Global.isUIHidden = False;
  • Else;
  • Play Effect(Event Player, Buff Explosion Sound, Color(White), Event Player, 100);
  • Global.isUIHidden = True;
  • End;
  • }
  • }
  • rule("[All modes] Change hero")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 1;
  • Slot 0;
  • }
  • conditions
  • {
  • Is Button Held(Event Player, Button(Melee)) == True;
  • Distance Between(Global.changeHeroButton, Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)
  • + Facing Direction Of(Event Player) * Distance Between(Eye Position(Event Player), Global.changeHeroButton), Null,
  • Event Player, True)) <= 1;
  • }
  • actions
  • {
  • Wait(0.500, Abort When False);
  • Set Player Allowed Heroes(Event Player, Remove From Array(All Heroes, Hero Of(Event Player)));
  • Wait(1, Ignore Condition);
  • Reset Player Hero Availability(Event Player);
  • }
  • }
Join the Workshop.codes Discord