Create
Return to post

Comparing difference between and

View raw
  • variables
  • {
  • global:
  • 0: requireKill
  • 0: objectiveMode
  • 1: enemyHero
  • 2: playerSpawn
  • 3: playerSpawnFacing
  • 4: desertTimeCounter
  • 5: enemySpawnLocation
  • 6: enemySpawnLocationVector
  • 7: movementForward
  • 8: movementBackward
  • 9: movementLeft
  • 10: movementRight
  • 11: selectedHeroIconPosition
  • 12: reinIconPosition
  • 13: tracerIconPosition
  • 14: meiIconPosition
  • 15: killAreaLocation
  • 16: objectiveDescriptions
  • 17: hookDirection
  • player:
  • 0: wasStunned
  • }
  • subroutines
  • {
  • 0: spawnTrainingDummyBot
  • 1: generateEnemySpawnLocation
  • 2: onHookRelease
  • }
  • rule("Setup")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • actions
  • {
  • Disable Built-In Game Mode Announcer;
  • Disable Built-In Game Mode Completion;
  • Disable Built-In Game Mode Music;
  • Disable Built-In Game Mode Scoring;
  • Pause Match Time;
  • Set Match Time(817);
  • Global.requireKill = False;
  • Global.enemyHero = Hero(Tracer);
  • Global.objectiveDescriptions = Array(Custom String("Hook ({0}) and kill ({2}) the {1}.", Ability Icon String(Hero(Roadhog), Button(
  • Ability 1)), Global.enemyHero, Icon String(Skull)), Custom String("Hook ({0}) and drag the {1} to your {2}.",
  • Ability Icon String(Hero(Roadhog), Button(Ability 1)), Global.enemyHero, Global.hookDirection <= 0 ? Custom String("right")
  • : Custom String("left")), Custom String("Hook ({0}) the {1}.", Ability Icon String(Hero(Roadhog), Button(Ability 1)),
  • Global.enemyHero));
  • Global.objectiveMode = 0;
  • Global.playerSpawn = Vector(21.281, 1.606, -0.284);
  • Global.playerSpawnFacing = Vector(1, 0, 0);
  • Set Objective Description(All Players(Team 1), Global.requireKill ? Custom String("Hook ({0}) and kill ({1}) the {2}.",
  • Ability Icon String(Hero(Roadhog), Button(Ability 1)), Icon String(Skull), Global.enemyHero) : Custom String(
  • "Hook ({0}) the {1}.", Ability Icon String(Hero(Roadhog), Button(Ability 1)), Global.enemyHero), Visible To and String);
  • Set Objective Description(All Players(Team 1), Global.objectiveDescriptions[Global.objectiveMode], Visible To and String);
  • Create Effect(All Players(All Teams), Light Shaft, Red, Global.playerSpawn - Vector(0, 3, 0), 25, Visible To);
  • Global.desertTimeCounter = -0.100;
  • Call Subroutine(spawnTrainingDummyBot);
  • Create HUD Text(All Players(All Teams), Null, Custom String("Controls:"), Null, Left, 0, White, Team 1, White,
  • Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Null, Custom String(" · Toggle auto-kill on hook: {0}", Input Binding String(Button(
  • Interact))), Null, Left, 1, White, White, White, Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Null, Custom String(
  • " · Toggle objective (auto-kill on hook, drag to kill, hook and kill): {0}", Input Binding String(Button(Interact))), Null,
  • Left, 1, White, White, White, Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Null, Custom String(" · Change enemy hero: {0}", Input Binding String(Button(
  • Ultimate))), Null, Left, 2, White, White, White, Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Null, Custom String("Social Media:"), Null, Left, 3, White, Team 1, White,
  • Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Null, Custom String(" · https://twitter.com/_trySam", Input Binding String(Button(
  • Interact))), Null, Left, 4, White, White, White, Visible To and String, Default Visibility);
  • Create In-World Text(All Players(All Teams), Custom String("Roadhog hook trainer"), Global.tracerIconPosition + Vector(0, 8, 0), 2,
  • Clip Against Surfaces, Visible To Position and String, Green, Default Visibility);
  • Create In-World Text(All Players(All Teams), Custom String("Version 1.0"), Global.tracerIconPosition + Vector(0, 6, 0), 1.500,
  • Create In-World Text(All Players(All Teams), Custom String("Version 1.1"), Global.tracerIconPosition + Vector(0, 6, 0), 1.500,
  • Clip Against Surfaces, Visible To Position and String, White, Default Visibility);
  • Create In-World Text(All Players(All Teams), Custom String("Code: NAZD0"), Global.tracerIconPosition + Vector(0, 5, 0), 1.500,
  • Create In-World Text(All Players(All Teams), Custom String("Code: DTHWEC"), Global.tracerIconPosition + Vector(0, 5, 0), 1.500,
  • Clip Against Surfaces, Visible To Position and String, White, Default Visibility);
  • Create In-World Text(All Players(All Teams), Custom String("Change enemy hero ({0})", Input Binding String(Button(Ultimate))),
  • Global.tracerIconPosition + Vector(0, -2, 0), 1.500, Clip Against Surfaces, Visible To Position and String, White,
  • Default Visibility);
  • Create In-World Text(Players In Slot(0, Team 2).wasStunned && Global.objectiveMode == 1 ? All Players(All Teams) : 0,
  • Custom String("Drag here"), Global.killAreaLocation, 1.500, Clip Against Surfaces, Visible To and Position, White,
  • Default Visibility);
  • Create Effect(Players In Slot(0, Team 2).wasStunned && Global.objectiveMode == 1 ? All Players(All Teams) : Null, Ring, Team 2,
  • Global.killAreaLocation, 2.500, Visible To Position and Radius);
  • Global.hookDirection = Random Integer(0, 1) ? -3 : 3;
  • }
  • }
  • rule("Spawn player")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 1;
  • Slot 0;
  • }
  • conditions
  • {
  • Is Alive(Event Player) == True;
  • }
  • actions
  • {
  • Wait(2, Ignore Condition);
  • Teleport(Event Player, Global.playerSpawn);
  • Set Facing(Event Player, Global.playerSpawnFacing, To World);
  • Set Damage Received(Event Player, 0);
  • }
  • }
  • rule("Anti desert counter")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 1;
  • Slot 0;
  • }
  • conditions
  • {
  • (Distance Between(Global.playerSpawn, Position Of(Event Player)) > 25 && !Is In Spawn Room(Event Player)) == True;
  • }
  • actions
  • {
  • Global.desertTimeCounter = 0;
  • Chase Global Variable Over Time(desertTimeCounter, 5, 5, None);
  • Communicate(Event Player, Fall Back);
  • Big Message(Event Player, Custom String("You are deserting. Return!"));
  • While(Global.desertTimeCounter >= 0);
  • If(Global.desertTimeCounter >= 5);
  • Teleport(Event Player, Global.playerSpawn);
  • Set Facing(Event Player, Global.playerSpawnFacing, To World);
  • Communicate(Event Player, Sorry);
  • Else;
  • Small Message(Event Player, Round To Integer(5 - Global.desertTimeCounter, To Nearest));
  • Play Effect(Event Player, Debuff Impact Sound, Red, Event Player, 100);
  • End;
  • Wait(1, Ignore Condition);
  • End;
  • }
  • }
  • rule("Disable desert counter")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 1;
  • Slot 0;
  • }
  • conditions
  • {
  • Distance Between(Global.playerSpawn, Position Of(Event Player)) <= 25;
  • }
  • actions
  • {
  • Stop Chasing Global Variable(desertTimeCounter);
  • Global.desertTimeCounter = -0.100;
  • If(Distance Between(Global.playerSpawn, Position Of(Event Player)) > 24);
  • Communicate(Event Player, Thanks);
  • End;
  • }
  • }
  • rule("Toggle requireKill")
  • rule("Change objectiveMode")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Is Button Held(Event Player, Interact) == True;
  • }
  • actions
  • {
  • Global.requireKill = !Global.requireKill;
  • Global.objectiveMode = Global.objectiveMode >= 2 ? 0 : Global.objectiveMode + 1;
  • }
  • }
  • rule("spawnTrainingDummyBot")
  • {
  • event
  • {
  • Subroutine;
  • spawnTrainingDummyBot;
  • }
  • actions
  • {
  • Destroy All Dummy Bots;
  • Call Subroutine(generateEnemySpawnLocation);
  • Create Dummy Bot(Global.enemyHero, Team 2, 0, Global.enemySpawnLocation, Direction Towards(Global.enemySpawnLocation, Eye Position(
  • Players In Slot(0, Team 1))));
  • Global.objectiveDescriptions = Array(Custom String("Hook ({0}) and kill ({2}) the {1}.", Ability Icon String(Hero(Roadhog), Button(
  • Ability 1)), Global.enemyHero, Icon String(Skull)), Custom String("Hook ({0}) and drag the {1} to your {2}.",
  • Ability Icon String(Hero(Roadhog), Button(Ability 1)), Global.enemyHero, Global.hookDirection <= 0 ? Custom String("right")
  • : Custom String("left")), Custom String("Hook ({0}) the {1}.", Ability Icon String(Hero(Roadhog), Button(Ability 1)),
  • Global.enemyHero));
  • }
  • }
  • rule("generateEnemySpawnLocations")
  • {
  • event
  • {
  • Subroutine;
  • generateEnemySpawnLocation;
  • }
  • actions
  • {
  • Global.enemySpawnLocationVector = Normalize(Vector(Random Real(-1, 1), 0, Random Real(-1, 1)));
  • Global.enemySpawnLocation = Global.playerSpawn + Global.enemySpawnLocationVector * Random Real(5, 20);
  • }
  • }
  • rule("Enemy spawn")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 2;
  • Slot 0;
  • }
  • conditions
  • {
  • Is Alive(Event Player) == True;
  • }
  • actions
  • {
  • Call Subroutine(generateEnemySpawnLocation);
  • Teleport(Event Player, Global.enemySpawnLocation);
  • Set Facing(Event Player, Direction Towards(Position Of(Event Player), Position Of(Players In Slot(0, Team 1))), To World);
  • Stop Holding Button(Event Player, Primary Fire);
  • Stop Holding Button(Event Player, Secondary Fire);
  • Start Facing(Event Player, Direction Towards(Position Of(Event Player), Position Of(Players In Slot(0, Team 1))), 90, To World,
  • Direction and Turn Rate);
  • }
  • }
  • rule("Kill when killing is not required")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 2;
  • Slot 0;
  • }
  • conditions
  • {
  • Has Status(Event Player, Stunned) == True;
  • Global.requireKill == False;
  • Global.objectiveMode == 2;
  • }
  • actions
  • {
  • Kill(Event Player, Players In Slot(0, Team 1));
  • }
  • }
  • rule("Enemy scheduler")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 2;
  • Slot 0;
  • }
  • actions
  • {
  • Wait(0.500, Ignore Condition);
  • If(Distance Between(Global.playerSpawn, Position Of(Event Player)) > 25);
  • Call Subroutine(generateEnemySpawnLocation);
  • Teleport(Event Player, Global.enemySpawnLocation);
  • Set Facing(Event Player, Direction Towards(Global.enemySpawnLocation, Global.playerSpawn), To World);
  • End;
  • If(Event Player.wasStunned && !Has Status(Event Player, Stunned));
  • Call Subroutine(onHookRelease);
  • Event Player.wasStunned = False;
  • End;
  • Loop;
  • }
  • }
  • rule("On hooked")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Player Took Damage;
  • Team 2;
  • Slot 0;
  • }
  • conditions
  • {
  • Has Status(Event Player, Stunned) == True;
  • Event Ability == Button(Ability 1);
  • Event Player.wasStunned == False;
  • }
  • actions
  • {
  • Event Player.wasStunned = True;
  • If(Hero Of(Players In Slot(0, Team 2)) == Hero(Reinhardt));
  • Set Player Health(Event Player, 200);
  • End;
  • If(Global.objectiveMode == 1);
  • Global.killAreaLocation = World Vector Of(Local Vector Of(Position Of(Players In Slot(0, Team 1)) + Vector(0, 0.100, 0),
  • Players In Slot(0, Team 1), Rotation And Translation) + Vector(Global.hookDirection, 0, 0), Players In Slot(0, Team 1),
  • Rotation And Translation);
  • End;
  • }
  • }
  • rule("onHookRelease")
  • {
  • event
  • {
  • Subroutine;
  • onHookRelease;
  • Ongoing - Each Player;
  • Team 2;
  • Slot 0;
  • }
  • conditions
  • {
  • Has Status(Event Player, Stunned) == False;
  • Event Player.wasStunned == True;
  • }
  • actions
  • {
  • Event Player.wasStunned = False;
  • If(Global.objectiveMode == 2);
  • Abort;
  • Else If(Global.objectiveMode == 1);
  • If(Distance Between(Position Of(Event Player), Global.killAreaLocation) < 2.500);
  • Kill(Event Player, Players In Slot(0, Team 1));
  • Big Message(All Players(Team 1), Custom String("Nice!"));
  • End;
  • End;
  • If(Hero Of(Players In Slot(0, Team 2)) == Hero(Tracer));
  • If(Ability Cooldown(Players In Slot(0, Team 2), Button(Ability 2)) == 0);
  • "Recall"
  • Press Button(Event Player, Ability 2);
  • Else;
  • "Blink"
  • Press Button(Event Player, Ability 1);
  • End;
  • Else If(Hero Of(Players In Slot(0, Team 2)) == Hero(Reinhardt));
  • "Shield up"
  • Start Holding Button(Players In Slot(0, Team 2), Secondary Fire);
  • Else If(Hero Of(Players In Slot(0, Team 2)) == Hero(Mei));
  • If(Ability Cooldown(Players In Slot(0, Team 2), Button(Ability 1)) == 0);
  • "Iceblock"
  • Press Button(Event Player, Ability 1);
  • End;
  • End;
  • Start Holding Button(Players In Slot(0, Team 2), Crouch);
  • Wait(0.500, Abort When False);
  • Stop Holding Button(Players In Slot(0, Team 2), Crouch);
  • }
  • }
  • rule("Setup movement vectors")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • actions
  • {
  • Global.movementForward = Vector(0, 0, 1);
  • Global.movementBackward = Vector(0, 0, -1);
  • Global.movementLeft = Vector(1, 0, 0);
  • Global.movementRight = Vector(-1, 0, 0);
  • }
  • }
  • rule("Reinhardt movement")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 2;
  • Reinhardt;
  • }
  • actions
  • {
  • If(Distance Between(Position Of(Players In Slot(0, Team 2)), Global.playerSpawn) > 16);
  • Start Facing(Event Player, Direction Towards(Position Of(Event Player), Global.playerSpawn), 90, To World,
  • Direction and Turn Rate);
  • Start Throttle In Direction(Event Player, Global.movementForward, 1, To Player, Replace existing throttle,
  • Direction and Magnitude);
  • Else If(Distance Between(Position Of(Event Player), Global.playerSpawn) < 3.300);
  • Start Facing(Event Player, Direction Towards(Position Of(Event Player), Global.playerSpawn), 100, To World,
  • Direction and Turn Rate);
  • Start Throttle In Direction(Event Player, Global.movementBackward, 1, To Player, Replace existing throttle,
  • Direction and Magnitude);
  • Else;
  • Start Facing(Event Player, Direction Towards(Position Of(Event Player), Position Of(Players In Slot(0, Team 1))), 90, To World,
  • Direction and Turn Rate);
  • Start Throttle In Direction(Event Player, Random Integer(0, 1) == 0 ? Global.movementLeft : Global.movementRight, 1, To Player,
  • Replace existing throttle, Direction and Magnitude);
  • If(Distance Between(Position Of(Players In Slot(0, Team 2)), Position Of(Players In Slot(0, Team 1))) > 15);
  • Start Throttle In Direction(Event Player, Global.movementForward, 1, To Player, Replace existing throttle,
  • Direction and Magnitude);
  • Else If(Distance Between(Position Of(Players In Slot(0, Team 1)), Position Of(Players In Slot(0, Team 2))) < 3);
  • Start Throttle In Direction(Event Player, Global.movementBackward, 1, To Player, Replace existing throttle,
  • Direction and Magnitude);
  • End;
  • End;
  • Wait(Random Real(0.500, 1), Ignore Condition);
  • Loop If Condition Is True;
  • }
  • }
  • rule("Reinhardt abilities")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 2;
  • Reinhardt;
  • }
  • actions
  • {
  • Set Ultimate Charge(Event Player, Ultimate Charge Percent(Event Player) + 15);
  • If(Is Button Held(Players In Slot(0, Team 2), Secondary Fire) == False);
  • Start Holding Button(Players In Slot(0, Team 2), Secondary Fire);
  • End;
  • If(Ability Cooldown(Event Player, Button(Ability 2)) == 0);
  • Press Button(Event Player, Ability 2);
  • Else If(Random Real(0, 1) < 0.100);
  • Press Button(Event Player, Ultimate);
  • End;
  • Wait(Random Real(2.500, 5), Ignore Condition);
  • Loop If Condition Is True;
  • }
  • }
  • rule("Mei movement")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 2;
  • Mei;
  • }
  • actions
  • {
  • If(Distance Between(Position Of(Players In Slot(0, Team 2)), Global.playerSpawn) > 16);
  • Start Facing(Event Player, Direction Towards(Position Of(Event Player), Global.playerSpawn), 90, To World,
  • Direction and Turn Rate);
  • Start Throttle In Direction(Event Player, Global.movementForward, 1, To Player, Replace existing throttle,
  • Direction and Magnitude);
  • Else If(Distance Between(Position Of(Event Player), Global.playerSpawn) < 3.300);
  • Start Facing(Event Player, Direction Towards(Position Of(Event Player), Global.playerSpawn), 100, To World,
  • Direction and Turn Rate);
  • Start Throttle In Direction(Event Player, Global.movementBackward, 1, To Player, Replace existing throttle,
  • Direction and Magnitude);
  • Else;
  • Start Facing(Event Player, Direction Towards(Position Of(Event Player), Position Of(Players In Slot(0, Team 1))), 90, To World,
  • Direction and Turn Rate);
  • Start Throttle In Direction(Event Player, Random Integer(0, 1) == 0 ? Global.movementLeft : Global.movementRight, 1, To Player,
  • Replace existing throttle, Direction and Magnitude);
  • If(Distance Between(Position Of(Players In Slot(0, Team 2)), Position Of(Players In Slot(0, Team 1))) > 10);
  • Start Throttle In Direction(Event Player, Global.movementForward, 1, To Player, Replace existing throttle,
  • Direction and Magnitude);
  • Else If(Ammo(Event Player, 0) < 15 || Distance Between(Position Of(Event Player), Position Of(Players In Slot(0, Team 1))) < 3);
  • Start Throttle In Direction(Event Player, Global.movementBackward, 1, To Player, Replace existing throttle,
  • Direction and Magnitude);
  • End;
  • End;
  • Wait(Random Real(0.500, 1), Ignore Condition);
  • Loop If Condition Is True;
  • }
  • }
  • rule("Mei abilities")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 2;
  • Mei;
  • }
  • actions
  • {
  • If(Ammo(Event Player, 0) < 15);
  • Press Button(Event Player, Reload);
  • End;
  • If(Distance Between(Position Of(Event Player), Position Of(Players In Slot(0, Team 1))) < 10);
  • If(!Is Button Held(Event Player, Primary Fire));
  • Start Holding Button(Event Player, Primary Fire);
  • End;
  • Else;
  • Stop Holding Button(Event Player, Primary Fire);
  • End;
  • Wait(Random Real(2.500, 5), Ignore Condition);
  • Loop If Condition Is True;
  • }
  • }
  • rule("Tracer abilities")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 2;
  • Tracer;
  • }
  • actions
  • {
  • Press Button(Event Player, Ability 1);
  • If(Health(Players In Slot(0, Team 2)) < 75);
  • Press Button(Event Player, Ability 2);
  • End;
  • Wait(Random Real(2, 5), Ignore Condition);
  • Loop If Condition Is True;
  • }
  • }
  • rule("Tracer movement")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 2;
  • Tracer;
  • }
  • actions
  • {
  • If(Distance Between(Position Of(Players In Slot(0, Team 2)), Global.playerSpawn) > 16);
  • Start Facing(Event Player, Direction Towards(Position Of(Event Player), Global.playerSpawn), 90, To World,
  • Direction and Turn Rate);
  • Start Throttle In Direction(Event Player, Global.movementForward, 1, To Player, Replace existing throttle,
  • Direction and Magnitude);
  • Else If(Distance Between(Position Of(Players In Slot(0, Team 2)), Global.playerSpawn) < 15);
  • Else If(Distance Between(Position Of(Event Player), Global.playerSpawn) < 3.300);
  • Start Facing(Event Player, Direction Towards(Position Of(Event Player), Global.playerSpawn), 100, To World,
  • Direction and Turn Rate);
  • Start Throttle In Direction(Event Player, Global.movementBackward, 1, To Player, Replace existing throttle,
  • Direction and Magnitude);
  • Else;
  • Start Facing(Event Player, Direction Towards(Position Of(Event Player), Position Of(Players In Slot(0, Team 1))), 90, To World,
  • Direction and Turn Rate);
  • Start Throttle In Direction(Event Player, Random Integer(0, 1) == 0 ? Global.movementLeft : Global.movementRight, 1, To Player,
  • Replace existing throttle, Direction and Magnitude);
  • If(Distance Between(Position Of(Players In Slot(0, Team 2)), Position Of(Players In Slot(0, Team 1))) > 20);
  • Start Throttle In Direction(Event Player, Global.movementForward, 1, To Player, Replace existing throttle,
  • Direction and Magnitude);
  • Else If(Distance Between(Position Of(Players In Slot(0, Team 1)), Position Of(Players In Slot(0, Team 2))) < 3);
  • Start Throttle In Direction(Event Player, Global.movementBackward, 1, To Player, Replace existing throttle,
  • Direction and Magnitude);
  • End;
  • End;
  • Wait(Random Real(0.250, 0.750), Ignore Condition);
  • Loop If Condition Is True;
  • }
  • }
  • rule("Setup movement vectors")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • actions
  • {
  • Global.movementForward = Vector(0, 0, 1);
  • Global.movementBackward = Vector(0, 0, -1);
  • Global.movementLeft = Vector(1, 0, 0);
  • Global.movementRight = Vector(-1, 0, 0);
  • }
  • }
  • rule("Button logic")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Team 1;
  • Slot 0;
  • }
  • conditions
  • {
  • Is Button Held(Event Player, Ultimate) == True;
  • }
  • actions
  • {
  • If(Is In View Angle(Players In Slot(0, Team 1), Global.reinIconPosition, 4) == True);
  • Global.enemyHero = Hero(Reinhardt);
  • Global.selectedHeroIconPosition = Global.reinIconPosition;
  • Call Subroutine(spawnTrainingDummyBot);
  • Else If(Is In View Angle(Players In Slot(0, Team 1), Global.tracerIconPosition, 4) == True);
  • Global.enemyHero = Hero(Tracer);
  • Global.selectedHeroIconPosition = Global.tracerIconPosition;
  • Call Subroutine(spawnTrainingDummyBot);
  • Else If(Is In View Angle(Players In Slot(0, Team 1), Global.meiIconPosition, 4) == True);
  • Global.enemyHero = Hero(Mei);
  • Global.selectedHeroIconPosition = Global.meiIconPosition;
  • Call Subroutine(spawnTrainingDummyBot);
  • End;
  • }
  • }
  • rule("Setup buttons")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • actions
  • {
  • Global.reinIconPosition = Global.playerSpawn + Vector(20, 5, -3);
  • Global.tracerIconPosition = Global.playerSpawn + Vector(20, 5, 0);
  • Global.meiIconPosition = Global.playerSpawn + Vector(20, 5, 3);
  • Create In-World Text(All Players(Team 1), Hero Icon String(Hero(Reinhardt)), Global.reinIconPosition - Vector(0, 1, 0), 2,
  • Do Not Clip, Visible To, White, Visible Never);
  • Create In-World Text(All Players(Team 1), Hero Icon String(Hero(Tracer)), Global.tracerIconPosition - Vector(0, 1, 0), 2,
  • Do Not Clip, Visible To, White, Visible Never);
  • Create In-World Text(All Players(Team 1), Hero Icon String(Hero(Mei)), Global.meiIconPosition - Vector(0, 1, 0), 2, Do Not Clip,
  • Visible To, White, Visible Never);
  • Global.selectedHeroIconPosition = Global.tracerIconPosition;
  • Create Effect(All Players(All Teams), Good Aura, Green, Global.selectedHeroIconPosition, 1.500, Visible To Position and Radius);
  • }
  • }
  • rule("Global scheduler")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • actions
  • {
  • If(!Players In Slot(0, Team 2).wasStunned);
  • Global.hookDirection = Random Integer(0, 1) ? -3 : 3;
  • Wait(0.250, Ignore Condition);
  • Global.objectiveDescriptions = Array(Custom String("Hook ({0}) and kill ({2}) the {1}.", Ability Icon String(Hero(Roadhog), Button(
  • Ability 1)), Global.enemyHero, Icon String(Skull)), Custom String("Hook ({0}) and drag the {1} to your {2}.",
  • Ability Icon String(Hero(Roadhog), Button(Ability 1)), Global.enemyHero, Global.hookDirection <= 0 ? Custom String("right")
  • : Custom String("left")), Custom String("Hook ({0}) the {1}.", Ability Icon String(Hero(Roadhog), Button(Ability 1)),
  • Global.enemyHero));
  • End;
  • Wait(30, Ignore Condition);
  • Loop;
  • }
  • }
Join the Workshop.codes Discord