Return to post
settings
{
main
{
Description: "Aim Training Labs. Practice and improve your aim with various different modes. Works for Hitscan and straight Projectile heroes. Made by Mitsiee at https://workshop.codes/aimlabs"
}
lobby
{
Allow Players Who Are In Queue: Yes
Max Spectators: 0
Max Team 1 Players: 1
Max Team 2 Players: 0
}
modes
{
Skirmish
{
enabled maps
{
Workshop Chamber
}
}
General
{
Limit Roles: 2 Of Each Role Per Team
}
}
heroes
{
General
{
Ana
{
Biotic Grenade: Off
No Ammunition Requirement: On
Sleep Dart: Off
Ultimate Generation - Combat Nano Boost: 0%
Ultimate Generation - Passive Nano Boost: 0%
Ultimate Generation Nano Boost: 10%
}
Ashe
{
Coach Gun: Off
Dynamite: Off
No Ammunition Requirement: On
Ultimate Generation - Combat B.O.B.: 0%
Ultimate Generation - Passive B.O.B.: 0%
Ultimate Generation B.O.B.: 10%
}
Baptiste
{
Immortality Field: Off
No Ammunition Requirement: On
Regenerative Burst: Off
Secondary Fire: Off
Ultimate Generation - Combat Amplification Matrix: 0%
Ultimate Generation - Passive Amplification Matrix: 0%
Ultimate Generation Amplification Matrix: 10%
}
Bastion
{
No Ammunition Requirement: On
Self-Repair: Off
Ultimate Generation - Combat Configuration: Tank: 0%
Ultimate Generation - Passive Configuration: Tank: 0%
Ultimate Generation Configuration: Tank: 10%
}
Echo
{
Flight: Off
Focusing Beam: Off
Glide: Off
No Ammunition Requirement: On
Quick Melee: Off
Sticky Bombs: Off
Ultimate Generation - Combat Duplicate: 0%
Ultimate Generation - Passive Duplicate: 0%
Ultimate Generation Duplicate: 10%
}
Genji
{
Deflect: Off
No Ammunition Requirement: On
Secondary Fire: Off
Swift Strike: Off
Ultimate Generation - Combat Dragonblade: 0%
Ultimate Generation - Passive Dragonblade: 0%
Ultimate Generation Dragonblade: 10%
}
McCree
{
Combat Roll: Off
Flashbang: Off
No Ammunition Requirement: On
Secondary Fire: Off
Ultimate Generation - Combat Deadeye: 0%
Ultimate Generation - Passive Deadeye: 0%
Ultimate Generation Deadeye: 10%
}
Mei
{
Cryo-Freeze: Off
Ice Wall: Off
No Ammunition Requirement: On
Primary Fire: Off
Quick Melee: Off
Ultimate Generation - Combat Blizzard: 0%
Ultimate Generation - Passive Blizzard: 0%
Ultimate Generation Blizzard: 10%
}
Mercy
{
Guardian Angel: Off
No Ammunition Requirement: On
Resurrect: Off
Ultimate Generation - Combat Valkyrie: 0%
Ultimate Generation - Passive Valkyrie: 0%
Ultimate Generation Valkyrie: 10%
Weapons Enabled: Caduceus Blaster Only
}
Orisa
{
Fortify: Off
Halt!: Off
No Ammunition Requirement: On
Protective Barrier: Off
Ultimate Generation - Combat Supercharger: 0%
Ultimate Generation - Passive Supercharger: 0%
Ultimate Generation Supercharger: 10%
}
Soldier: 76
{
Biotic Field: Off
Helix Rockets: Off
No Ammunition Requirement: On
Sprint: Off
Ultimate Generation - Combat Tactical Visor: 0%
Ultimate Generation - Passive Tactical Visor: 0%
Ultimate Generation Tactical Visor: 10%
Ultimate Ability Tactical Visor: Off
}
Widowmaker
{
Grappling Hook: Off
No Ammunition Requirement: On
Quick Melee: Off
Ultimate Generation - Combat Infra-Sight: 0%
Ultimate Generation - Passive Infra-Sight: 0%
Ultimate Generation Infra-Sight: 10%
Venom Mine: Off
}
Wrecking Ball
{
Adaptive Shield: Off
Grappling Claw: Off
No Ammunition Requirement: On
Piledriver: Off
Roll: Off
Ultimate Generation - Combat Minefield: 0%
Ultimate Generation - Passive Minefield: 0%
Ultimate Generation Minefield: 10%
}
Zenyatta
{
No Ammunition Requirement: On
Orb of Discord: Off
Orb of Harmony: Off
Secondary Fire: Off
Ultimate Generation - Combat Transcendence: 0%
Ultimate Generation - Passive Transcendence: 0%
Ultimate Generation Transcendence: 10%
}
enabled heroes
{
Ana
Ashe
Baptiste
Bastion
Echo
Genji
McCree
Mei
Mercy
Orisa
Soldier: 76
Widowmaker
Wrecking Ball
Zenyatta
}
}
}
}
variables
{
global:
0: BallRadius
1: BallPositions
2: GridPositions
3: Mode
4: GridLoopZ
5: GridLoopY
6: GridStart
7: GridDone
8: RandomLoop
9: GridNumberOfBalls
10: BallPositionsCheckLoop
11: IsInPregame
12: SmallBall
13: RandomBalls
14: NeedToWalk
15: CountdownActive
16: CountdownSphereEffect
18: ProjectileHeroes
19: SpawnPosition
20: NoiseEffect
21: PositiveOrNegative
22: MovingTime
23: MovingDirection
24: HealthyTargets
25: CurrentTargetHealth
player:
0: RaycastPrimaryFire
1: ShootLoop
2: HitPosition
3: CurrentCheckPosition
4: ShotsFired
5: ShotsLanded
6: RaycastDistance
7: IsProjectileHero
8: ProjectileSpeed
9: ProjectileDelay
10: ProjectileSize
11: FacingDirection
12: EyeLocationWhenFired
14: ReactionTimeArray
15: CurrentReactionTime
16: AverageReactionTime
17: CalculateAverageReactionTimeLoop
}
subroutines
{
0: SetRandomPosition
1: SetBallSize
2: EnableFire
3: SetRandom360Position
4: ResetTargetHealth
5: ChaseReactionTime
}
disabled rule("------------------------------------------- Initialise")
{
event
{
Ongoing - Global;
}
}
rule("Initialise")
{
event
{
Ongoing - Global;
}
actions
{
Disable Inspector Recording;
Disable Built-In Game Mode Music;
Global.BallRadius = 0.500;
Global.Mode = 0;
Global.GridStart = Vector(-8, 1.500, 0);
Global.GridNumberOfBalls = 4;
Global.IsInPregame = True;
Global.NeedToWalk = False;
Global.SpawnPosition = Vector(0, 1.500, 0);
Global.PositiveOrNegative = Empty Array;
Global.PositiveOrNegative = Append To Array(Global.PositiveOrNegative, -1);
Global.PositiveOrNegative = Append To Array(Global.PositiveOrNegative, 1);
Global.CurrentTargetHealth = 0;
Set Global Variable(BallRadius, 0.500);
Set Global Variable(Mode, 0);
Set Global Variable(GridStart, Vector(-8, 1.500, 0));
Set Global Variable(GridNumberOfBalls, 4);
Set Global Variable(IsInPregame, True);
Set Global Variable(NeedToWalk, False);
Set Global Variable(SpawnPosition, Vector(0, 1.500, 0));
Set Global Variable(PositiveOrNegative, Empty Array);
Set Global Variable(PositiveOrNegative, Append To Array(Global Variable(PositiveOrNegative), -1));
Set Global Variable(PositiveOrNegative, Append To Array(Global Variable(PositiveOrNegative), 1));
}
}
rule("Teleport player")
{
event
{
Ongoing - Each Player;
All;
All;
}
conditions
{
Has Spawned(Event Player) == True;
}
actions
{
Teleport(Event Player, Global.SpawnPosition);
Teleport(Event Player, Global Variable(SpawnPosition));
}
}
rule("Back to menu")
{
event
{
Ongoing - Each Player;
All;
All;
}
conditions
{
Is Button Held(Event Player, Crouch) == True;
Is Button Held(Event Player, Interact) == True;
}
actions
{
Global.IsInPregame = True;
Set Global Variable(IsInPregame, True);
}
}
rule("Swap hero")
{
event
{
Ongoing - Each Player;
All;
All;
}
conditions
{
Is Button Held(Event Player, Crouch) == True;
Is Button Held(Event Player, Reload) == True;
Is Button Held(Event Player, Jump) == True;
}
actions
{
Set Player Allowed Heroes(Event Player, Remove From Array(All Heroes, Hero Of(Event Player)));
Wait(0.250, Ignore Condition);
Reset Player Hero Availability(Event Player);
}
}
rule("Create Projectile Heroes array")
{
event
{
Ongoing - Global;
}
actions
{
Global.ProjectileHeroes = Empty Array;
Global.ProjectileHeroes = Append To Array(Global.ProjectileHeroes, Hero(Echo));
Global.ProjectileHeroes = Append To Array(Global.ProjectileHeroes, Hero(Mei));
Global.ProjectileHeroes = Append To Array(Global.ProjectileHeroes, Hero(Ana));
Global.ProjectileHeroes = Append To Array(Global.ProjectileHeroes, Hero(Genji));
Global.ProjectileHeroes = Append To Array(Global.ProjectileHeroes, Hero(Orisa));
Global.ProjectileHeroes = Append To Array(Global.ProjectileHeroes, Hero(Mercy));
Set Global Variable(ProjectileHeroes, Empty Array);
Set Global Variable(ProjectileHeroes, Append To Array(Global Variable(ProjectileHeroes), Hero(Echo)));
Set Global Variable(ProjectileHeroes, Append To Array(Global Variable(ProjectileHeroes), Hero(Mei)));
Set Global Variable(ProjectileHeroes, Append To Array(Global Variable(ProjectileHeroes), Hero(Ana)));
Set Global Variable(ProjectileHeroes, Append To Array(Global Variable(ProjectileHeroes), Hero(Genji)));
Set Global Variable(ProjectileHeroes, Append To Array(Global Variable(ProjectileHeroes), Hero(Orisa)));
}
}
rule("Is Projectile Hero?")
{
event
{
Ongoing - Each Player;
All;
All;
}
conditions
{
Array Contains(Global.ProjectileHeroes, Hero Of(Event Player)) == True;
Array Contains(Global Variable(ProjectileHeroes), Hero Of(Event Player)) == True;
}
actions
{
Event Player.IsProjectileHero = True;
"Set default values"
Event Player.ProjectileDelay = 0;
"Set values per hero"
If(Hero Of(Event Player) == Hero(Echo));
Event Player.ProjectileSpeed = 75;
Event Player.ProjectileSize = 0.500;
Else If(Hero Of(Event Player) == Hero(Mei));
Event Player.ProjectileSpeed = 115;
Event Player.ProjectileDelay = 0.400;
Event Player.ProjectileSize = 0.150;
Else If(Hero Of(Event Player) == Hero(Ana));
Event Player.ProjectileSpeed = 125;
Event Player.ProjectileSize = 0;
Else If(Hero Of(Event Player) == Hero(Genji));
Event Player.ProjectileSpeed = 60;
Event Player.ProjectileSize = 0.100;
Else If(Hero Of(Event Player) == Hero(Orisa));
Event Player.ProjectileSpeed = 90;
Event Player.ProjectileSize = 0.100;
Else If(Hero Of(Event Player) == Hero(Mercy));
Event Player.ProjectileSpeed = 50;
Event Player.ProjectileSize = 0.250;
Else If(Hero Of(Event Player) == Hero(Zenyatta));
Event Player.ProjectileSpeed = 90;
Event Player.ProjectileSize = 0.150;
Else If(Hero Of(Event Player) == Hero(Pharah));
Event Player.ProjectileSpeed = 35;
Event Player.ProjectileSize = 0.200;
Else If(Hero Of(Event Player) == Hero(Reinhardt));
Event Player.ProjectileSpeed = 25;
Event Player.ProjectileDelay = 0.480;
Event Player.ProjectileSize = 0.850;
Else If(Hero Of(Event Player) == Hero(D.Va));
Event Player.ProjectileSpeed = 50;
Event Player.ProjectileSize = 0.250;
Else If(Hero Of(Event Player) == Hero(Junkrat));
Event Player.ProjectileSpeed = 25;
Event Player.ProjectileSize = 0.200;
Else If(Hero Of(Event Player) == Hero(Torbjörn));
Event Player.ProjectileSpeed = 70;
Event Player.ProjectileSize = 0.100;
Else If(Hero Of(Event Player) == Hero(Hanzo));
Event Player.ProjectileSpeed = 110;
Event Player.ProjectileSize = 0.100;
Else If(Hero Of(Event Player) == Hero(Zarya));
Event Player.ProjectileSpeed = 25;
Event Player.ProjectileSize = 0.200;
Else If(Hero Of(Event Player) == Hero(Lúcio));
Event Player.ProjectileSpeed = 50;
Event Player.ProjectileSize = 0.150;
Set Player Variable(Event Player, IsProjectileHero, True);
If(Compare(Hero Of(Event Player), ==, Hero(Echo)));
"Projectile speed per second"
Set Player Variable(Event Player, ProjectileSpeed, 75);
Set Player Variable(Event Player, ProjectileDelay, 0);
Set Player Variable(Event Player, ProjectileSize, 0.500);
Else If(Compare(Hero Of(Event Player), ==, Hero(Mei)));
"Projectile speed per second"
Set Player Variable(Event Player, ProjectileSpeed, 115);
Set Player Variable(Event Player, ProjectileDelay, 0.400);
Set Player Variable(Event Player, ProjectileSize, 0.300);
Else If(Compare(Hero Of(Event Player), ==, Hero(Ana)));
"Projectile speed per second"
Set Player Variable(Event Player, ProjectileSpeed, 125);
Set Player Variable(Event Player, ProjectileDelay, 0);
Set Player Variable(Event Player, ProjectileSize, 0);
Else If(Compare(Hero Of(Event Player), ==, Hero(Genji)));
"Projectile speed per second"
Set Player Variable(Event Player, ProjectileSpeed, 60);
Set Player Variable(Event Player, ProjectileDelay, 0);
Set Player Variable(Event Player, ProjectileSize, 0);
Else If(Compare(Hero Of(Event Player), ==, Hero(Orisa)));
"Projectile speed per second"
Set Player Variable(Event Player, ProjectileSpeed, 90);
Set Player Variable(Event Player, ProjectileDelay, 0);
Set Player Variable(Event Player, ProjectileSize, 0);
End;
}
}
rule("Is not projectile hero?")
{
event
{
Ongoing - Each Player;
All;
All;
}
conditions
{
Array Contains(Global.ProjectileHeroes, Hero Of(Event Player)) != True;
Array Contains(Global Variable(ProjectileHeroes), Hero Of(Event Player)) != True;
}
actions
{
Event Player.IsProjectileHero = False;
Event Player.ProjectileSize = 0;
Event Player.ProjectileDelay = 0;
Event Player.ProjectileSpeed = 0;
Set Player Variable(Event Player, IsProjectileHero, False);
Set Player Variable(Event Player, ProjectileSize, 0);
Set Player Variable(Event Player, ProjectileDelay, 0);
Set Player Variable(Event Player, ProjectileSpeed, 0);
}
}
rule("Special case, Ana in scope")
{
event
{
Ongoing - Each Player;
All;
All;
}
conditions
{
Hero Of(Event Player) == Hero(Ana);
Is Firing Secondary(Event Player) == True;
}
actions
{
"Projectile speed per second"
Event Player.ProjectileSpeed = 0;
Set Player Variable(Event Player, ProjectileSpeed, 0);
}
}
rule("Special case, Ana not in scope")
{
event
{
Ongoing - Each Player;
All;
All;
}
conditions
{
Hero Of(Event Player) == Hero(Ana);
Is Firing Secondary(Event Player) != True;
}
actions
{
"Projectile speed per second"
Event Player.ProjectileSpeed = 125;
Set Player Variable(Event Player, ProjectileSpeed, 125);
}
}
disabled rule("------------------------------------------- HUD")
{
event
{
Ongoing - Global;
}
}
rule("HUD - Accuracy")
{
event
{
Ongoing - Each Player;
All;
All;
}
actions
{
Create HUD Text(Event Player, Null, Null, Custom String("Shots: {0} Hit: {1} Accuracy: {2}%", Event Player.ShotsFired,
Event Player.ShotsLanded, 100 / Event Player.ShotsFired * Event Player.ShotsLanded), Top, 1, White, White, White,
Visible To and String, Default Visibility);
Create HUD Text(Filtered Array((Global.IsInPregame && Count Of(Event Player.ReactionTimeArray) > 1) == True, True), Null, Null,
Custom String("Avg. Reaction time during last run: {0}", Event Player.AverageReactionTime), Top, 2, White, White, White,
Visible To and String, Default Visibility);
Create HUD Text(Event Player, Null, Null, Custom String("Shots: {0} Hit: {1} Accuracy: {2}%", Player Variable(Event Player,
ShotsFired), Player Variable(Event Player, ShotsLanded), Multiply(Divide(100, Player Variable(Event Player, ShotsFired)),
Player Variable(Event Player, ShotsLanded))), Top, 1, White, White, White, Visible To and String, Default Visibility);
}
}
rule("HUD - Controls")
{
event
{
Ongoing - Global;
}
actions
{
Create HUD Text(All Players(All Teams), Null, Custom String("Press [Crouch] + [Interact] to go back to the menu", Server Load,
Server Load Peak, Server Load Average), Null, Right, -5, White, Blue, White, Visible To and String, Default Visibility);
Create HUD Text(All Players(All Teams), Null, Custom String("Press [Crouch] + [Reload] + [Jump] to swap heroes", Server Load,
Server Load Peak, Server Load Average), Null, Right, -4, White, Sky Blue, White, Visible To and String, Default Visibility);
}
}
rule("HUD - Workshop.codes link")
{
event
{
Ongoing - Global;
}
actions
{
Create HUD Text(All Players(All Teams), Null, Null, Custom String("Workshop.codes/aimlabs"), Top, 0, White, Orange, Orange,
Visible To and String, Default Visibility);
Create HUD Text(All Players(All Teams), Null, Null, Custom String("Workshop.codes/aimlabs", Null, Null, Null), Top, 0, White,
Orange, Orange, Visible To and String, Default Visibility);
}
}
disabled rule("----------------------------------------- Pregame")
{
event
{
Ongoing - Global;
}
}
rule("Is in pregame")
{
event
{
Ongoing - Each Player;
All;
All;
}
conditions
{
Global.IsInPregame == True;
Global Variable(IsInPregame) == True;
Has Spawned(Event Player) == True;
Is Assembling Heroes != True;
}
actions
{
Call Subroutine(EnableFire);
Global.BallPositions = Empty Array;
Global.BallPositions = Append To Array(Global.BallPositions, Vector(-12, 1.500, 0));
Set Global Variable(BallPositions, Empty Array);
Set Global Variable(BallPositions, Append To Array(Global Variable(BallPositions), Vector(-12, 1.500, 0)));
Set Match Time(3599);
}
}
rule("Is not in pregame")
{
event
{
Ongoing - Each Player;
All;
All;
}
conditions
{
Global.IsInPregame != True;
Global Variable(IsInPregame) != True;
}
}
rule("Is in pregame game selection HUD")
{
event
{
Ongoing - Global;
}
actions
{
"Title"
Create HUD Text(Global.IsInPregame, Null, Custom String(" "), Null, Left, 0, White, White, White, Visible To and String,
Default Visibility);
Create HUD Text(Global Variable(IsInPregame), Null, Custom String(" ", Null, Null, Null), Null, Left, 0, White, White, White,
Visible To and String, Default Visibility);
Wait(0.020, Ignore Condition);
Create HUD Text(Global.IsInPregame, Null, Null, Custom String("Select a gamemode", Global.GridNumberOfBalls), Left, 0, White,
White, Turquoise, Visible To and String, Default Visibility);
Create HUD Text(Global Variable(IsInPregame), Null, Null, Custom String("Select a gamemode", Global Variable(GridNumberOfBalls),
Null, Null), Left, 0, White, White, Turquoise, Visible To and String, Default Visibility);
Wait(0.020, Ignore Condition);
"Bunch of empty hud texts to push other text down"
Create HUD Text(Global.IsInPregame, Null, Custom String(" "), Null, Left, 0, White, White, White, Visible To and String,
Default Visibility);
Create HUD Text(Global.IsInPregame, Null, Custom String(" "), Null, Left, 0, White, White, White, Visible To and String,
Default Visibility);
Create HUD Text(Global.IsInPregame, Null, Custom String(" "), Null, Left, 0, White, White, White, Visible To and String,
Default Visibility);
Create HUD Text(Global.IsInPregame, Null, Custom String(" "), Null, Left, 0, White, White, White, Visible To and String,
Default Visibility);
Create HUD Text(Global.IsInPregame, Null, Custom String(" "), Null, Left, 0, White, White, White, Visible To and String,
Default Visibility);
Create HUD Text(Global Variable(IsInPregame), Null, Custom String(" ", Null, Null, Null), Null, Left, 0, White, White, White,
Visible To and String, Default Visibility);
Create HUD Text(Global Variable(IsInPregame), Null, Custom String(" ", Null, Null, Null), Null, Left, 0, White, White, White,
Visible To and String, Default Visibility);
Create HUD Text(Global Variable(IsInPregame), Null, Custom String(" ", Null, Null, Null), Null, Left, 0, White, White, White,
Visible To and String, Default Visibility);
Create HUD Text(Global Variable(IsInPregame), Null, Custom String(" ", Null, Null, Null), Null, Left, 0, White, White, White,
Visible To and String, Default Visibility);
Create HUD Text(Global Variable(IsInPregame), Null, Custom String(" ", Null, Null, Null), Null, Left, 0, White, White, White,
Visible To and String, Default Visibility);
Wait(0.020, Ignore Condition);
"Standard mode"
Create HUD Text(Global.IsInPregame, Custom String("Standard"), Custom String("Select with [Ability 1] + [Primary Fire]"),
Custom String("1 Target at a random location"), Left, 1, White, White, White, Visible To and String, Default Visibility);
Create HUD Text(Global Variable(IsInPregame), Custom String("Standard", Null, Null, Null), Custom String(
"Select with [Ability 1] + [Primary Fire]", Null, Null, Null), Custom String("1 Target at a random location", Null, Null,
Null), Left, 1, White, White, White, Visible To and String, Default Visibility);
Wait(0.020, Ignore Condition);
"Grid mode, available"
Create HUD Text(Filtered Array(Global.IsInPregame && !Global.HealthyTargets, 0 == 0), Custom String("Grid"), Custom String(
"Select with [Ability 1] + [Secondary Fire]"), Custom String("{0} Targets in a tight grid", Global.GridNumberOfBalls), Left, 2,
White, White, White, Visible To and String, Default Visibility);
"Grid mode, unavailable"
Create HUD Text(Filtered Array(Global.IsInPregame && Global.HealthyTargets, 0 == 0), Custom String("Grid"), Custom String(
"Disabled because of modifier"), Custom String("{0} Targets in a tight grid", Global.GridNumberOfBalls), Left, 2, Red, White,
White, Visible To and String, Default Visibility);
"Grid mode"
Create HUD Text(Global Variable(IsInPregame), Custom String("Grid", Null, Null, Null), Custom String(
"Select with [Ability 1] + [Secondary Fire]", Null, Null, Null), Custom String("{0} Targets in a tight grid", Global Variable(
GridNumberOfBalls), Null, Null), Left, 2, White, White, White, Visible To and String, Default Visibility);
Wait(0.020, Ignore Condition);
"Awareness mode"
Create HUD Text(Global.IsInPregame, Custom String("Awareness"), Custom String("Select with [Ability 1] + [Interact]"),
Custom String("Targets appear all around the lab but make a constant noise to help you find them", Global.GridNumberOfBalls),
Left, 3, White, White, White, Visible To and String, Default Visibility);
Create HUD Text(Global Variable(IsInPregame), Custom String("Awareness", Null, Null, Null), Custom String(
"Select with [Ability 1] + [Interact]", Null, Null, Null), Custom String(
"Targets appear all around the lab but make a constant noise to help you find them", Global Variable(GridNumberOfBalls), Null,
Null), Left, 3, White, White, White, Visible To and String, Default Visibility);
Wait(0.020, Ignore Condition);
"Strafing mode"
Create HUD Text(Global.IsInPregame, Custom String("Strafing targets"), Custom String("Select with [Ability 1] + [Crouch]"),
Custom String("Targets strafe in a random direction"), Left, 4, White, White, White, Visible To and String,
Default Visibility);
"Awareness mode"
Create HUD Text(Global Variable(IsInPregame), Custom String("Strafing targets", Null, Null, Null), Custom String(
"Select with [Ability 1] + [Crouch]", Null, Null, Null), Custom String("Targets strafe in a random direction", Null, Null,
Null), Left, 4, White, White, White, Visible To and String, Default Visibility);
Wait(0.020, Ignore Condition);
}
}
rule("Is in pregame in-world text")
{
event
{
Ongoing - Global;
}
actions
{
Create In-World Text(Global.IsInPregame, Custom String("Select a mode on the left side of the screen to start"),
Global.BallPositions[0], 1.250, Do Not Clip, Visible To Position and String, Turquoise, Default Visibility);
Create In-World Text(Global Variable(IsInPregame), Custom String("Select a mode on the left side of the screen to start", Null,
Null, Null), Value In Array(Global Variable(BallPositions), 0), 1.250, Do Not Clip, Visible To Position and String, Turquoise,
Default Visibility);
}
}
rule("Start Grid Mode")
{
event
{
Ongoing - Each Player;
All;
All;
}
conditions
{
Is Button Held(Event Player, Ability 1) == True;
Is Button Held(Event Player, Secondary Fire) == True;
Global.IsInPregame == True;
Global.HealthyTargets != True;
Global Variable(IsInPregame) == True;
}
actions
{
Global.IsInPregame = False;
Global.Mode = 0;
Set Global Variable(IsInPregame, False);
Set Global Variable(Mode, 0);
}
}
rule("Start Standard Mode")
{
event
{
Ongoing - Each Player;
All;
All;
}
conditions
{
Is Button Held(Event Player, Ability 1) == True;
Is Button Held(Event Player, Primary Fire) == True;
Global.IsInPregame == True;
Global Variable(IsInPregame) == True;
}
actions
{
Global.IsInPregame = False;
Global.Mode = 1;
Set Global Variable(IsInPregame, False);
Set Global Variable(Mode, 1);
}
}
rule("Start Awareness Mode")
{
event
{
Ongoing - Each Player;
All;
All;
}
conditions
{
Is Button Held(Event Player, Ability 1) == True;
Is Button Held(Event Player, Interact) == True;
Global.IsInPregame == True;
Global Variable(IsInPregame) == True;
}
actions
{
Global.IsInPregame = False;
Global.Mode = 2;
Set Global Variable(IsInPregame, False);
Set Global Variable(Mode, 2);
}
}
rule("Start Strafing Targets Mode")
{
event
{
Ongoing - Each Player;
All;
All;
}
conditions
{
Is Button Held(Event Player, Ability 1) == True;
Is Button Held(Event Player, Crouch) == True;
Global.IsInPregame == True;
Global Variable(IsInPregame) == True;
}
actions
{
Global.IsInPregame = False;
Global.Mode = 3;
Set Global Variable(IsInPregame, False);
Set Global Variable(Mode, 3);
}
}
rule("Subroutine - Enable primary or secondary")
{
event
{
Subroutine;
EnableFire;
}
actions
{
If(Hero Of(Event Player) == Hero(Mei));
If(Compare(Hero Of(Event Player), ==, Hero(Mei)));
Set Primary Fire Enabled(Event Player, False);
Set Secondary Fire Enabled(Event Player, True);
Else;
Set Primary Fire Enabled(Event Player, True);
Set Secondary Fire Enabled(Event Player, False);
End;
If(Hero Of(Event Player) == Hero(Widowmaker) || Hero Of(Event Player) == Hero(Ashe) || Hero Of(Event Player) == Hero(Ana));
If(Or(Compare(Hero Of(Event Player), ==, Hero(Widowmaker)), Or(Compare(Hero Of(Event Player), ==, Hero(Ashe)), Compare(Hero Of(
Event Player), ==, Hero(Ana)))));
Set Secondary Fire Enabled(Event Player, True);
End;
}
}
rule("Subroutine - Set Ball Size")
{
event
{
Subroutine;
SetBallSize;
}
actions
{
If(Global.RandomBalls);
If(Global.SmallBall);
Global.BallRadius = Random Real(0.150, 0.300);
If(Global Variable(RandomBalls));
If(Global Variable(SmallBall));
Set Global Variable(BallRadius, Random Real(0.150, 0.300));
Else;
Global.BallRadius = Random Real(0.200, 0.550);
Set Global Variable(BallRadius, Random Real(0.200, 0.550));
End;
Else;
If(Global.SmallBall);
Global.BallRadius = 0.250;
If(Global Variable(SmallBall));
Set Global Variable(BallRadius, 0.250);
Else;
Global.BallRadius = 0.500;
Set Global Variable(BallRadius, 0.500);
End;
End;
}
}
disabled rule("---------------------------------------- Reaction time")
{
event
{
Ongoing - Global;
}
}
rule("Subroutine - Start chase on reaction time array")
{
event
{
Subroutine;
ChaseReactionTime;
}
actions
{
Event Player.ReactionTimeArray = Empty Array;
Chase Player Variable At Rate(Event Player, CurrentReactionTime, 1000, 1, Destination and Rate);
}
}
rule("Add to reaction time array")
{
event
{
Ongoing - Each Player;
All;
All;
}
conditions
{
((Hero Of(Event Player) == Hero(Mei) && Is Firing Secondary(Event Player)) || (Hero Of(Event Player) != Hero(Mei)
&& Is Firing Primary(Event Player))) == True;
Global.IsInPregame != True;
}
actions
{
Event Player.ReactionTimeArray = Append To Array(Event Player.ReactionTimeArray, Event Player.CurrentReactionTime);
Event Player.CurrentReactionTime = 0;
}
}
rule("Calculate average reaction time")
{
event
{
Ongoing - Each Player;
All;
All;
}
conditions
{
Global.IsInPregame == True;
Count Of(Event Player.ReactionTimeArray) > 1;
}
actions
{
For Player Variable(Event Player, CalculateAverageReactionTimeLoop, 0, Count Of(Event Player.ReactionTimeArray), 1);
Event Player.AverageReactionTime += Event Player.ReactionTimeArray[Event Player.CalculateAverageReactionTimeLoop];
End;
Event Player.AverageReactionTime /= Count Of(Event Player.ReactionTimeArray);
Event Player.CurrentReactionTime = 1000;
}
}
disabled rule("---------------------------------------- Modifiers")
{
event
{
Ongoing - Global;
}
}
rule("Modifiers HUD")
{
event
{
Ongoing - Global;
}
actions
{
"Title"
Create HUD Text(Global.IsInPregame, Null, Custom String(" "), Null, Left, 10, White, White, White, Visible To and String,
Default Visibility);
Create HUD Text(Global Variable(IsInPregame), Null, Custom String(" ", Null, Null, Null), Null, Left, 10, White, White, White,
Visible To and String, Default Visibility);
Wait(0.020, Ignore Condition);
Create HUD Text(Global.IsInPregame, Null, Null, Custom String("Select optional modifiers", Global.GridNumberOfBalls), Left, 10,
White, White, Orange, Visible To and String, Default Visibility);
Create HUD Text(Global Variable(IsInPregame), Null, Null, Custom String("Select optional modifiers", Global Variable(
GridNumberOfBalls), Null, Null), Left, 10, White, White, Orange, Visible To and String, Default Visibility);
Wait(0.020, Ignore Condition);
"Bunch of empty hud texts to push other text down"
Create HUD Text(Global.IsInPregame, Null, Custom String(" "), Null, Left, 10, White, White, White, Visible To and String,
Default Visibility);
Create HUD Text(Global.IsInPregame, Null, Custom String(" "), Null, Left, 10, White, White, White, Visible To and String,
Default Visibility);
Create HUD Text(Global.IsInPregame, Null, Custom String(" "), Null, Left, 10, White, White, White, Visible To and String,
Default Visibility);
Create HUD Text(Global Variable(IsInPregame), Null, Custom String(" ", Null, Null, Null), Null, Left, 10, White, White, White,
Visible To and String, Default Visibility);
Create HUD Text(Global Variable(IsInPregame), Null, Custom String(" ", Null, Null, Null), Null, Left, 10, White, White, White,
Visible To and String, Default Visibility);
Create HUD Text(Global Variable(IsInPregame), Null, Custom String(" ", Null, Null, Null), Null, Left, 10, White, White, White,
Visible To and String, Default Visibility);
Wait(0.020, Ignore Condition);
"Small ball, inactive"
Create HUD Text(Filtered Array(Global.IsInPregame && !Global.SmallBall, True), Custom String("Small targets"), Custom String(
"Select with [Ability 2] + [Primary Fire]"), Custom String("The targets are much smaller"), Left, 11, White, White, White,
Visible To and String, Default Visibility);
Create HUD Text(Filtered Array(And(Global Variable(IsInPregame), Not(Global Variable(SmallBall))), True), Custom String(
"Small targets", Null, Null, Null), Custom String("Select with [Ability 2] + [Primary Fire]", Null, Null, Null), Custom String(
"The targets are much smaller", Null, Null, Null), Left, 11, White, White, White, Visible To and String, Default Visibility);
"Small ball, active"
Create HUD Text(Filtered Array(Global.IsInPregame && Global.SmallBall, True), Custom String("Small targets"), Custom String(
"Select with [Ability 2] + [Primary Fire]"), Custom String("Targets are much smaller"), Left, 11, Green, White, White,
Visible To and String, Default Visibility);
Create HUD Text(Filtered Array(And(Global Variable(IsInPregame), Global Variable(SmallBall)), True), Custom String("Small targets",
Null, Null, Null), Custom String("Select with [Ability 2] + [Primary Fire]", Null, Null, Null), Custom String(
"Targets are much smaller", Null, Null, Null), Left, 11, Green, White, White, Visible To and String, Default Visibility);
"Random balls, inactive"
Create HUD Text(Filtered Array(Global.IsInPregame && !Global.RandomBalls, True), Custom String("Random target size"),
Custom String("Select with [Ability 2] + [Secondary Fire]"), Custom String(
"Every time you hit a target the target size changes"), Left, 12, White, White, White, Visible To and String,
Default Visibility);
Create HUD Text(Filtered Array(And(Global Variable(IsInPregame), Not(Global Variable(RandomBalls))), True), Custom String(
"Random target size", Null, Null, Null), Custom String("Select with [Ability 2] + [Secondary Fire]", Null, Null, Null),
Custom String("Every time you hit a target the target size changes", Null, Null, Null), Left, 12, White, White, White,
Visible To and String, Default Visibility);
"Random balls, active"
Create HUD Text(Filtered Array(Global.IsInPregame && Global.RandomBalls, True), Custom String("Random target size"), Custom String(
"Select with [Ability 2] + [Secondary Fire]"), Custom String("Every time you hit a target size changes"), Left, 12, Green,
White, White, Visible To and String, Default Visibility);
"Further away, inactive"
Create HUD Text(Filtered Array(Global.IsInPregame && X Component Of(Global.SpawnPosition) == 0, True), Custom String("Sniper"),
Custom String("Select with [Ability 2] + [Crouch]"), Custom String("You stand further away"), Left, 13, White, White, White,
Create HUD Text(Filtered Array(And(Global Variable(IsInPregame), Global Variable(RandomBalls)), True), Custom String(
"Random target size", Null, Null, Null), Custom String("Select with [Ability 2] + [Secondary Fire]", Null, Null, Null),
Custom String("Every time you hit a target size changes", Null, Null, Null), Left, 12, Green, White, White,
Visible To and String, Default Visibility);
"Further away, inactive"
Create HUD Text(Filtered Array(And(Global Variable(IsInPregame), Compare(X Component Of(Global Variable(SpawnPosition)), ==, 0)),
True), Custom String("Sniper", Null, Null, Null), Custom String("Select with [Ability 2] + [Crouch]", Null, Null, Null),
Custom String("You stand further away", Null, Null, Null), Left, 13, White, White, White, Visible To and String,
Default Visibility);
"Further away, active"
Create HUD Text(Filtered Array(Global.IsInPregame && X Component Of(Global.SpawnPosition) != 0, True), Custom String("Sniper"),
Custom String("Select with [Ability 2] + [Crouch]"), Custom String("You stand further away"), Left, 13, Green, White, White,
Visible To and String, Default Visibility);
"Healthy targets, inactive"
Create HUD Text(Filtered Array(Global.IsInPregame && !Global.HealthyTargets, True), Custom String("Healthy targets"),
Custom String("Select with [Ability 2] + [Interact]"), Custom String("Targets take 5 hits to destroy"), Left, 14, White, White,
White, Visible To and String, Default Visibility);
"Healthy targets, active"
Create HUD Text(Filtered Array(Global.IsInPregame && Global.HealthyTargets, True), Custom String("Healthy targets"), Custom String(
"Select with [Ability 2] + [Interact]"), Custom String("Targets take 5 hits to destroy"), Left, 14, Green, White, White,
Visible To and String, Default Visibility);
Create HUD Text(Filtered Array(And(Global Variable(IsInPregame), Compare(X Component Of(Global Variable(SpawnPosition)), !=, 0)),
True), Custom String("Sniper", Null, Null, Null), Custom String("Select with [Ability 2] + [Crouch]", Null, Null, Null),
Custom String("You stand further away", Null, Null, Null), Left, 13, Green, White, White, Visible To and String,
Default Visibility);
}
}
rule("Select small size modifier")
{
event
{
Ongoing - Each Player;
All;
All;
}
conditions
{
Is Button Held(Event Player, Ability 2) == True;
Is Button Held(Event Player, Primary Fire) == True;
Global.IsInPregame == True;
}
actions
{
If(Global.SmallBall == True);
Global.BallRadius = 0.500;
Global.SmallBall = False;
If(Compare(Global Variable(SmallBall), ==, True));
Set Global Variable(BallRadius, 0.500);
Set Global Variable(SmallBall, False);
Else;
Global.BallRadius = 0.250;
Global.SmallBall = True;
Set Global Variable(BallRadius, 0.250);
Set Global Variable(SmallBall, True);
End;
}
}
rule("Random target size")
{
event
{
Ongoing - Each Player;
All;
All;
}
conditions
{
Is Button Held(Event Player, Ability 2) == True;
Is Button Held(Event Player, Secondary Fire) == True;
Global.IsInPregame == True;
}
actions
{
If(Global.RandomBalls == True);
Global.RandomBalls = False;
If(Compare(Global Variable(RandomBalls), ==, True));
Set Global Variable(RandomBalls, False);
Else;
Global.RandomBalls = True;
Set Global Variable(RandomBalls, True);
End;
Call Subroutine(SetBallSize);
}
}
rule("Cannot walk")
{
event
{
Ongoing - Each Player;
All;
All;
}
conditions
{
Global.NeedToWalk == False;
Global.IsInPregame == True;
Global Variable(NeedToWalk) == False;
}
actions
{
Set Status(Event Player, Null, Rooted, 9999);
}
}
rule("Can walk")
{
event
{
Ongoing - Each Player;
All;
All;
}
conditions
{
Global.NeedToWalk == True;
Global.IsInPregame == True;
Global Variable(NeedToWalk) == True;
}
actions
{
Clear Status(Event Player, Rooted);
}
}
rule("Location modifier")
{
event
{
Ongoing - Each Player;
All;
All;
}
conditions
{
Is Button Held(Event Player, Ability 2) == True;
Is Button Held(Event Player, Crouch) == True;
Global.IsInPregame == True;
}
actions
{
If(Global.SpawnPosition == Vector(0, 1.500, 0));
Global.SpawnPosition = Vector(12, 1.500, 0);
If(Compare(Global Variable(SpawnPosition), ==, Vector(0, 1.500, 0)));
Set Global Variable(SpawnPosition, Vector(12, 1.500, 0));
Else;
Global.SpawnPosition = Vector(0, 1.500, 0);
Set Global Variable(SpawnPosition, Vector(0, 1.500, 0));
End;
Teleport(Event Player, Global.SpawnPosition);
}
}
rule("Healthy targets")
{
event
{
Ongoing - Each Player;
All;
All;
}
conditions
{
Is Button Held(Event Player, Ability 2) == True;
Is Button Held(Event Player, Interact) == True;
Global.IsInPregame == True;
}
actions
{
Global.HealthyTargets = !Global.HealthyTargets;
Call Subroutine(ResetTargetHealth);
}
}
rule("Subroutine - Reset healthy target health")
{
event
{
Subroutine;
ResetTargetHealth;
}
actions
{
Global.CurrentTargetHealth = 4;
}
}
rule("Healthy target in-world text")
{
event
{
Ongoing - Global;
}
actions
{
Create In-World Text(Filtered Array(Global.HealthyTargets && Global.CurrentTargetHealth == 4, True), Custom String("■■■■■"),
Global.BallPositions[0] + Vector(0, Global.BallRadius, 0), 1, Clip Against Surfaces, Visible To Position and String, Green,
Default Visibility);
Create In-World Text(Filtered Array(Global.HealthyTargets && Global.CurrentTargetHealth == 3, True), Custom String("■■■■"),
Global.BallPositions[0] + Vector(0, Global.BallRadius, 0), 1, Clip Against Surfaces, Visible To Position and String, Orange,
Default Visibility);
Create In-World Text(Filtered Array(Global.HealthyTargets && Global.CurrentTargetHealth == 2, True), Custom String("■■■"),
Global.BallPositions[0] + Vector(0, Global.BallRadius, 0), 1, Clip Against Surfaces, Visible To Position and String, Orange,
Default Visibility);
Create In-World Text(Filtered Array(Global.HealthyTargets && Global.CurrentTargetHealth == 1, True), Custom String("■■"),
Global.BallPositions[0] + Vector(0, Global.BallRadius, 0), 1, Clip Against Surfaces, Visible To Position and String, Orange,
Default Visibility);
Create In-World Text(Filtered Array(Global.HealthyTargets && Global.CurrentTargetHealth == 0, True), Custom String("■"),
Global.BallPositions[0] + Vector(0, Global.BallRadius, 0), 1, Clip Against Surfaces, Visible To Position and String, Red,
Default Visibility);
Teleport(Event Player, Global Variable(SpawnPosition));
}
}
disabled rule("---------------------------------------- Mode is about to start")
{
event
{
Ongoing - Global;
}
}
rule("Countdown")
{
event
{
Ongoing - Each Player;
All;
All;
}
conditions
{
Global.IsInPregame != True;
Global Variable(IsInPregame) != True;
}
actions
{
Create Effect(All Players(All Teams), Sphere, Aqua, Event Player, 2, Visible To Position and Radius);
Global.CountdownSphereEffect = Last Created Entity;
Wait(0.050, Ignore Condition);
Global.CountdownActive = True;
Event Player.ShotsFired = 0;
Event Player.ShotsLanded = 0;
Set Global Variable(CountdownActive, True);
Set Player Variable(Event Player, ShotsFired, 0);
Set Player Variable(Event Player, ShotsLanded, 0);
Set Primary Fire Enabled(Event Player, False);
Set Secondary Fire Enabled(Event Player, False);
Small Message(All Players(All Teams), Custom String("3..."));
Create Effect(All Players(All Teams), Sphere, Aqua, Event Player, 2, Visible To Position and Radius);
Set Global Variable(CountdownSphereEffect, Last Created Entity);
Small Message(All Players(All Teams), Custom String("3...", Null, Null, Null));
Wait(1, Ignore Condition);
Small Message(All Players(All Teams), Custom String("2..."));
Small Message(All Players(All Teams), Custom String("2...", Null, Null, Null));
Wait(1, Ignore Condition);
Small Message(All Players(All Teams), Custom String("1..."));
Small Message(All Players(All Teams), Custom String("1...", Null, Null, Null));
Wait(1, Ignore Condition);
Small Message(All Players(All Teams), Custom String("GO!"));
Small Message(All Players(All Teams), Custom String("GO!", Null, Null, Null));
Play Effect(All Players(All Teams), Ring Explosion Sound, White, Event Player, 100);
Call Subroutine(EnableFire);
Global.CountdownActive = False;
Destroy Effect(Global.CountdownSphereEffect);
Set Global Variable(CountdownActive, False);
Destroy Effect(Global Variable(CountdownSphereEffect));
Play Effect(All Players(All Teams), Ring Explosion, Aqua, Event Player, 10);
}
}
disabled rule("--------------------------------------Timer")
{
event
{
Ongoing - Global;
}
}
rule("Start Timer")
{
event
{
Ongoing - Each Player;
All;
All;
}
conditions
{
Global.IsInPregame != True;
Global.CountdownActive != True;
Global Variable(IsInPregame) != True;
Global Variable(CountdownActive) != True;
}
actions
{
Wait(0.050, Abort When False);
Set Match Time(60.500);
Event Player.CurrentReactionTime = 0;
Call Subroutine(ChaseReactionTime);
}
}
rule("End of timer")
{
event
{
Ongoing - Each Player;
All;
All;
}
conditions
{
Match Time < 0.500;
}
actions
{
Set Match Time(3599);
Global.CountdownActive = True;
Set Global Variable(CountdownActive, True);
Set Primary Fire Enabled(Event Player, False);
Set Secondary Fire Enabled(Event Player, False);
Play Effect(All Players(All Teams), Ring Explosion, Red, Event Player, 10);
Play Effect(All Players(All Teams), Ring Explosion Sound, White, Event Player, 100);
Create Effect(All Players(All Teams), Sphere, Red, Event Player, 2, Visible To Position and Radius);
Global.CountdownSphereEffect = Last Created Entity;
Set Global Variable(CountdownSphereEffect, Last Created Entity);
Wait(3, Ignore Condition);
Destroy Effect(Global.CountdownSphereEffect);
Global.IsInPregame = True;
Global.CountdownActive = False;
Event Player.CurrentReactionTime = 1000;
Destroy Effect(Global Variable(CountdownSphereEffect));
Set Global Variable(IsInPregame, True);
Set Global Variable(CountdownActive, False);
}
}
disabled rule("------------------------------------------- Bubbles")
{
event
{
Ongoing - Global;
}
}
rule("Create bubble effects")
{
event
{
Ongoing - Global;
}
actions
{
Create Effect(Filtered Array(All Players(All Teams), Count Of(Global.BallPositions) > 0), Sphere, Aqua, Global.BallPositions[0],
Global.BallRadius, Visible To Position and Radius);
Create Effect(Filtered Array(All Players(All Teams), Count Of(Global.BallPositions) > 1), Sphere, Aqua, Global.BallPositions[1],
Global.BallRadius, Visible To Position and Radius);
Create Effect(Filtered Array(All Players(All Teams), Count Of(Global.BallPositions) > 2), Sphere, Aqua, Global.BallPositions[2],
Global.BallRadius, Visible To Position and Radius);
Create Effect(Filtered Array(All Players(All Teams), Count Of(Global.BallPositions) > 3), Sphere, Aqua, Global.BallPositions[3],
Global.BallRadius, Visible To Position and Radius);
Create Effect(Filtered Array(All Players(All Teams), Count Of(Global.BallPositions) > 4), Sphere, Aqua, Global.BallPositions[4],
Global.BallRadius, Visible To Position and Radius);
Create Effect(Filtered Array(All Players(All Teams), Compare(Count Of(Global Variable(BallPositions)), >, 0)), Sphere, Aqua,
Value In Array(Global Variable(BallPositions), 0), Global Variable(BallRadius), Visible To Position and Radius);
Create Effect(Filtered Array(All Players(All Teams), Compare(Count Of(Global Variable(BallPositions)), >, 1)), Sphere, Aqua,
Value In Array(Global Variable(BallPositions), 1), Global Variable(BallRadius), Visible To Position and Radius);
Create Effect(Filtered Array(All Players(All Teams), Compare(Count Of(Global Variable(BallPositions)), >, 2)), Sphere, Aqua,
Value In Array(Global Variable(BallPositions), 2), Global Variable(BallRadius), Visible To Position and Radius);
Create Effect(Filtered Array(All Players(All Teams), Compare(Count Of(Global Variable(BallPositions)), >, 3)), Sphere, Aqua,
Value In Array(Global Variable(BallPositions), 3), Global Variable(BallRadius), Visible To Position and Radius);
Create Effect(Filtered Array(All Players(All Teams), Compare(Count Of(Global Variable(BallPositions)), >, 4)), Sphere, Aqua,
Value In Array(Global Variable(BallPositions), 4), Global Variable(BallRadius), Visible To Position and Radius);
}
}
rule("Ball is destroyed in pregame")
{
event
{
Ongoing - Global;
}
conditions
{
Global.IsInPregame == True;
Count Of(Global.BallPositions) == 0;
Global Variable(IsInPregame) == True;
Count Of(Global Variable(BallPositions)) == 0;
}
actions
{
Global.BallPositions = Empty Array;
Global.BallPositions = Append To Array(Global.BallPositions, Vector(-12, 1.500, 0));
Set Global Variable(BallPositions, Empty Array);
Set Global Variable(BallPositions, Append To Array(Global Variable(BallPositions), Vector(-12, 1.500, 0)));
}
}
rule("Shooting")
{
event
{
Ongoing - Each Player;
All;
All;
}
conditions
{
((Hero Of(Event Player) == Hero(Mei) && Is Firing Secondary(Event Player)) || (Hero Of(Event Player) != Hero(Mei)
&& Is Firing Primary(Event Player))) == True;
Or(And(Compare(Hero Of(Event Player), ==, Hero(Mei)), Is Firing Secondary(Event Player)), And(Compare(Hero Of(Event Player), !=,
Hero(Mei)), Is Firing Primary(Event Player))) == True;
}
actions
{
Event Player.FacingDirection = Facing Direction Of(Event Player);
If(Event Player.ProjectileDelay > 0);
Wait(Event Player.ProjectileDelay, Ignore Condition);
Event Player.FacingDirection = Facing Direction Of(Event Player);
Set Player Variable(Event Player, FacingDirection, Facing Direction Of(Event Player));
If(Compare(Player Variable(Event Player, ProjectileDelay), >, 0));
Wait(Player Variable(Event Player, ProjectileDelay), Ignore Condition);
Set Player Variable(Event Player, FacingDirection, Facing Direction Of(Event Player));
End;
Set Primary Fire Enabled(Event Player, False);
Set Secondary Fire Enabled(Event Player, False);
Event Player.ShotsFired += 1;
Event Player.EyeLocationWhenFired = Eye Position(Event Player);
Event Player.RaycastPrimaryFire = Ray Cast Hit Position(Event Player.EyeLocationWhenFired,
Event Player.EyeLocationWhenFired + Event Player.FacingDirection * 40, Null, All Players(All Teams), False);
Event Player.RaycastDistance = Distance Between(Event Player, Event Player.RaycastPrimaryFire);
If(Event Player.IsProjectileHero);
Wait(Distance Between(Event Player, Global.BallPositions[0]) / Event Player.ProjectileSpeed, Ignore Condition);
Modify Player Variable(Event Player, ShotsFired, Add, 1);
Set Player Variable(Event Player, EyeLocationWhenFired, Eye Position(Event Player));
Set Player Variable(Event Player, RaycastPrimaryFire, Ray Cast Hit Position(Player Variable(Event Player, EyeLocationWhenFired),
Add(Player Variable(Event Player, EyeLocationWhenFired), Multiply(Player Variable(Event Player, FacingDirection), 40)), Null,
All Players(All Teams), False));
Set Player Variable(Event Player, RaycastDistance, Distance Between(Event Player, Player Variable(Event Player,
RaycastPrimaryFire)));
If(Player Variable(Event Player, IsProjectileHero));
Wait(Divide(Distance Between(Event Player, Value In Array(Global Variable(BallPositions), 0)), Player Variable(Event Player,
ProjectileSpeed)), Ignore Condition);
End;
"Loop through all ball positions"
For Global Variable(BallPositionsCheckLoop, 0, Count Of(Global.BallPositions), 1);
For Global Variable(BallPositionsCheckLoop, 0, Count Of(Global Variable(BallPositions)), 1);
"Loop from player position to wall"
For Player Variable(Event Player, ShootLoop, 0, Event Player.RaycastDistance, 0.250);
For Player Variable(Event Player, ShootLoop, 0, Player Variable(Event Player, RaycastDistance), 0.250);
"Set current position in loop"
Event Player.CurrentCheckPosition = Ray Cast Hit Position(Event Player.EyeLocationWhenFired,
Event Player.EyeLocationWhenFired + Event Player.FacingDirection * Event Player.ShootLoop, All Players(All Teams),
Event Player, True);
Set Player Variable(Event Player, CurrentCheckPosition, Ray Cast Hit Position(Player Variable(Event Player, EyeLocationWhenFired),
Add(Player Variable(Event Player, EyeLocationWhenFired), Multiply(Player Variable(Event Player, FacingDirection),
Player Variable(Event Player, ShootLoop))), All Players(All Teams), Event Player, True));
"Check if current loop position is in ball"
If(Distance Between(Global.BallPositions[Global.BallPositionsCheckLoop], Event Player.CurrentCheckPosition)
< Global.BallRadius + Event Player.ProjectileSize);
"If in healthy mode and target health is higher than 0"
If(Global.HealthyTargets && Global.CurrentTargetHealth > 0);
Global.CurrentTargetHealth -= 1;
Else;
If(Global.HealthyTargets);
Call Subroutine(ResetTargetHealth);
End;
"Remove current ball from array"
Global.BallPositions = Remove From Array(Global.BallPositions, Global.BallPositions[Global.BallPositionsCheckLoop]);
End;
If(Compare(Distance Between(Value In Array(Global Variable(BallPositions), Global Variable(BallPositionsCheckLoop)),
Player Variable(Event Player, CurrentCheckPosition)), <, Add(Global Variable(BallRadius), Divide(Player Variable(Event Player,
ProjectileSize), 2))));
"Remove current ball from array"
Set Global Variable(BallPositions, Remove From Array(Global Variable(BallPositions), Value In Array(Global Variable(BallPositions),
Global Variable(BallPositionsCheckLoop))));
"Set position for effects to play at"
Event Player.HitPosition[0] = Event Player.CurrentCheckPosition;
Set Player Variable At Index(Event Player, HitPosition, 0, Player Variable(Event Player, CurrentCheckPosition));
"Play a bunch of effects at hit location"
Play Effect(All Players(All Teams), Buff Explosion Sound, Yellow, Event Player.HitPosition, Global.BallRadius * 100);
Play Effect(All Players(All Teams), Good Explosion, Sky Blue, Event Player.HitPosition, Global.BallRadius * 1);
Play Effect(All Players(All Teams), Bad Explosion, Blue, Event Player.HitPosition, Global.BallRadius * 2);
Event Player.ShotsLanded += 1;
Global.BallPositionsCheckLoop = 20;
Event Player.ShootLoop = 40;
Play Effect(All Players(All Teams), Buff Explosion Sound, Yellow, Player Variable(Event Player, HitPosition), Multiply(
Global Variable(BallRadius), 100));
Play Effect(All Players(All Teams), Good Explosion, Sky Blue, Player Variable(Event Player, HitPosition), Multiply(Global Variable(
BallRadius), 1));
Play Effect(All Players(All Teams), Bad Explosion, Blue, Player Variable(Event Player, HitPosition), Multiply(Global Variable(
BallRadius), 2));
Modify Player Variable(Event Player, ShotsLanded, Add, 1);
Set Global Variable(BallPositionsCheckLoop, 20);
Set Player Variable(Event Player, ShootLoop, 40);
Call Subroutine(SetBallSize);
End;
End;
End;
}
}
rule("Not shooting")
{
event
{
Ongoing - Each Player;
All;
All;
}
conditions
{
((Hero Of(Event Player) == Hero(Mei) && !Is Firing Secondary(Event Player)) || (Hero Of(Event Player) != Hero(Mei)
&& !Is Firing Primary(Event Player))) == True;
Global.CountdownActive != True;
Or(And(Compare(Hero Of(Event Player), ==, Hero(Mei)), Not(Is Firing Secondary(Event Player))), And(Compare(Hero Of(Event Player),
!=, Hero(Mei)), Not(Is Firing Primary(Event Player)))) == True;
Global Variable(CountdownActive) != True;
}
actions
{
Wait(Event Player.ProjectileDelay, Ignore Condition);
Wait(Player Variable(Event Player, ProjectileDelay), Ignore Condition);
Wait(0.050, Ignore Condition);
Call Subroutine(EnableFire);
}
}
rule("Effect where player hit ball")
{
event
{
Ongoing - Each Player;
All;
All;
}
actions
{
Create Effect(Is True For All(Event Player.HitPosition, Y Component Of(Current Array Element) != 0), Sphere, Red,
Event Player.HitPosition, Max(Event Player.ProjectileSize, 0.050), Visible To Position and Radius);
Create Effect(Is True For All(Player Variable(Event Player, HitPosition), Compare(Y Component Of(Current Array Element), !=, 0)),
Sphere, Red, Player Variable(Event Player, HitPosition), 0.100, Visible To Position and Radius);
}
}
rule("Remove hit effect after period")
{
event
{
Ongoing - Each Player;
All;
All;
}
conditions
{
Y Component Of(Event Player.HitPosition[0]) != 0;
Y Component Of(Value In Array(Player Variable(Event Player, HitPosition), 0)) != 0;
}
actions
{
Wait(0.750, Abort When False);
Event Player.HitPosition[0] = Vector(0, 0, -100);
Set Player Variable At Index(Event Player, HitPosition, 0, Vector(0, 0, 0));
}
}
disabled rule("----------------------------------------- Grid mode = 0")
{
event
{
Ongoing - Global;
}
}
rule("Create grid positions array")
{
event
{
Ongoing - Global;
}
conditions
{
Global.Mode == 0;
Global.IsInPregame != True;
Global Variable(Mode) == 0;
Global Variable(IsInPregame) != True;
}
actions
{
Global.GridDone = False;
Global.GridPositions = Empty Array;
Set Global Variable(GridDone, False);
Set Global Variable(GridPositions, Empty Array);
For Global Variable(GridLoopY, 0, 5, 1);
For Global Variable(GridLoopZ, -3, 3, 1);
Global.GridPositions = Append To Array(Global.GridPositions, Global.GridStart + Vector(0, Global.GridLoopY * 1.100,
Global.GridLoopZ * 1.100));
Set Global Variable(GridPositions, Append To Array(Global Variable(GridPositions), Add(Global Variable(GridStart), Vector(0,
Multiply(Global Variable(GridLoopY), 1.100), Multiply(Global Variable(GridLoopZ), 1.100)))));
End;
End;
Global.GridDone = True;
Set Global Variable(GridDone, True);
}
}
rule("Create x number of balls")
{
event
{
Ongoing - Global;
}
conditions
{
Global.GridDone == True;
Global.IsInPregame != True;
Global.Mode == 0;
Global Variable(GridDone) == True;
Global Variable(IsInPregame) != True;
Global Variable(Mode) == 0;
}
actions
{
Global.BallPositions = Empty Array;
For Global Variable(RandomLoop, 0, Global.GridNumberOfBalls, 1);
Global.BallPositions = Append To Array(Global.BallPositions, Random Value In Array(Remove From Array(Global.GridPositions,
Global.BallPositions)));
Set Global Variable(BallPositions, Empty Array);
For Global Variable(RandomLoop, 0, Global Variable(GridNumberOfBalls), 1);
Set Global Variable(BallPositions, Append To Array(Global Variable(BallPositions), Random Value In Array(Remove From Array(
Global Variable(GridPositions), Global Variable(BallPositions)))));
End;
}
}
rule("Create new grid ball if ball is removed")
{
event
{
Ongoing - Global;
}
conditions
{
Count Of(Global.BallPositions) < Global.GridNumberOfBalls;
Global.GridDone == True;
Global.IsInPregame != True;
Global.Mode == 0;
Count Of(Global Variable(BallPositions)) < Global Variable(GridNumberOfBalls);
Global Variable(GridDone) == True;
Global Variable(IsInPregame) != True;
Global Variable(Mode) == 0;
}
actions
{
Global.BallPositions = Append To Array(Global.BallPositions, Random Value In Array(Remove From Array(Global.GridPositions,
Global.BallPositions)));
Set Global Variable(BallPositions, Append To Array(Global Variable(BallPositions), Random Value In Array(Remove From Array(
Global Variable(GridPositions), Global Variable(BallPositions)))));
Loop If Condition Is True;
}
}
disabled rule("----------------------------------------- Standard mode = 1")
{
event
{
Ongoing - Global;
}
}
rule("Subroutine - Set random position")
{
event
{
Subroutine;
SetRandomPosition;
}
actions
{
Global.BallPositions = Append To Array(Global.BallPositions, Global.GridStart + Vector(Random Real(-6, 2), Random Real(0, 4),
Random Real(-6, 6)));
Set Global Variable(BallPositions, Append To Array(Global Variable(BallPositions), Add(Global Variable(GridStart), Vector(
Random Real(-6, 2), Random Real(0, 4), Random Real(-6, 6)))));
}
}
rule("Create ball at random position")
{
event
{
Ongoing - Global;
}
conditions
{
Global.Mode == 1;
Global.IsInPregame != True;
Global Variable(Mode) == 1;
Global Variable(IsInPregame) != True;
}
actions
{
Global.BallPositions = Empty Array;
Set Global Variable(BallPositions, Empty Array);
Call Subroutine(SetRandomPosition);
}
}
rule("Create new grid ball if ball is removed")
{
event
{
Ongoing - Global;
}
conditions
{
Global.Mode == 1;
Global.IsInPregame != True;
Count Of(Global.BallPositions) == 0;
Global Variable(Mode) == 1;
Global Variable(IsInPregame) != True;
Count Of(Global Variable(BallPositions)) == 0;
}
actions
{
Call Subroutine(SetRandomPosition);
}
}
disabled rule("----------------------------------------- Awareness mode = 2")
{
event
{
Ongoing - Global;
}
}
rule("Subroutine - Set random 360 position")
{
event
{
Subroutine;
SetRandom360Position;
}
actions
{
Global.BallPositions = Append To Array(Global.BallPositions, Vector(0, 0, 0) + Vector(Random Real(5, 15), Random Real(1, 6),
Random Real(5, 15)));
Global.BallPositions[0] = Vector(X Component Of(Global.BallPositions[0]) * Random Value In Array(Global.PositiveOrNegative),
Y Component Of(Global.BallPositions[0]), Z Component Of(Global.BallPositions[0]) * Random Value In Array(
Global.PositiveOrNegative));
Set Global Variable(BallPositions, Append To Array(Global Variable(BallPositions), Add(Vector(0, 0, 0), Vector(Random Real(5, 15),
Random Real(1, 6), Random Real(5, 15)))));
Set Global Variable At Index(BallPositions, 0, Vector(Multiply(X Component Of(Value In Array(Global Variable(BallPositions), 0)),
Random Value In Array(Global Variable(PositiveOrNegative))), Y Component Of(Value In Array(Global Variable(BallPositions), 0)),
Multiply(Z Component Of(Value In Array(Global Variable(BallPositions), 0)), Random Value In Array(Global Variable(
PositiveOrNegative)))));
Wait(0.150, Ignore Condition);
Play Effect(All Players(All Teams), Debuff Impact Sound, White, Global.BallPositions[0], 100);
Play Effect(All Players(All Teams), Debuff Impact Sound, White, Value In Array(Global Variable(BallPositions), 0), 100);
}
}
rule("Create ball at random position")
{
event
{
Ongoing - Global;
}
conditions
{
Global.Mode == 2;
Global.IsInPregame != True;
Global Variable(Mode) == 2;
Global Variable(IsInPregame) != True;
}
actions
{
Global.BallPositions = Empty Array;
Set Global Variable(BallPositions, Empty Array);
Call Subroutine(SetRandom360Position);
}
}
rule("Create new grid ball if ball is removed")
{
event
{
Ongoing - Global;
}
conditions
{
Global.Mode == 2;
Global.IsInPregame != True;
Count Of(Global.BallPositions) == 0;
Global Variable(Mode) == 2;
Global Variable(IsInPregame) != True;
Count Of(Global Variable(BallPositions)) == 0;
}
actions
{
Call Subroutine(SetRandom360Position);
}
}
rule("Create noise")
{
event
{
Ongoing - Global;
}
conditions
{
Global.Mode == 2;
Global.IsInPregame != True;
Global Variable(Mode) == 2;
Global Variable(IsInPregame) != True;
}
actions
{
Create Effect(All Players(All Teams), Beacon Sound, White, Global.BallPositions[0], 150, Visible To Position and Radius);
Global.NoiseEffect = Last Created Entity;
Create Effect(All Players(All Teams), Beacon Sound, White, Value In Array(Global Variable(BallPositions), 0), 150,
Visible To Position and Radius);
Set Global Variable(NoiseEffect, Last Created Entity);
}
}
rule("Remove noise")
{
event
{
Ongoing - Global;
}
conditions
{
Global.IsInPregame == True;
Global Variable(IsInPregame) == True;
}
actions
{
Destroy Effect(Global.NoiseEffect);
Destroy Effect(Global Variable(NoiseEffect));
}
}
disabled rule("----------------------------------------- Strafing targets mode = 3")
{
event
{
Ongoing - Global;
}
}
rule("Create ball at random position")
{
event
{
Ongoing - Global;
}
conditions
{
Global.Mode == 3;
Global.IsInPregame != True;
Global Variable(Mode) == 3;
Global Variable(IsInPregame) != True;
}
actions
{
Global.BallPositions = Empty Array;
Set Global Variable(BallPositions, Empty Array);
Call Subroutine(SetRandomPosition);
}
}
rule("Create new grid ball if ball is removed")
{
event
{
Ongoing - Global;
}
conditions
{
Global.Mode == 3;
Global.IsInPregame != True;
Count Of(Global.BallPositions) == 0;
Global Variable(Mode) == 3;
Global Variable(IsInPregame) != True;
Count Of(Global Variable(BallPositions)) == 0;
}
actions
{
Call Subroutine(SetRandomPosition);
}
}
rule("Set stuff to move ball")
{
event
{
Ongoing - Global;
}
conditions
{
Global.Mode == 3;
Global.IsInPregame != True;
Global Variable(Mode) == 3;
Global Variable(IsInPregame) != True;
}
actions
{
Global.MovingTime = Random Integer(0.500, 1.500);
Global.MovingDirection = Random Value In Array(Global.PositiveOrNegative);
Wait(Global.MovingTime, Ignore Condition);
Set Global Variable(MovingTime, Random Integer(0.500, 1.500));
Set Global Variable(MovingDirection, Random Value In Array(Global Variable(PositiveOrNegative)));
Wait(Global Variable(MovingTime), Ignore Condition);
Loop If Condition Is True;
}
}
rule("Move ball")
{
event
{
Ongoing - Global;
}
conditions
{
Global.Mode == 3;
Global.IsInPregame != True;
Global Variable(Mode) == 3;
Global Variable(IsInPregame) != True;
}
actions
{
Global.BallPositions[0] = Global.BallPositions[0] + Vector(0, 0, 0.150 * Global.MovingDirection);
Set Global Variable At Index(BallPositions, 0, Add(Value In Array(Global Variable(BallPositions), 0), Vector(0, 0, Multiply(0.150,
Global Variable(MovingDirection)))));
Wait(0.025, Ignore Condition);
Loop If Condition Is True;
}
}
rule("Is ball out of bounds on the negative side")
{
event
{
Ongoing - Global;
}
conditions
{
Global.Mode == 3;
Global.IsInPregame != True;
Z Component Of(Global.BallPositions[0]) < -12;
Global Variable(Mode) == 3;
Global Variable(IsInPregame) != True;
Z Component Of(Value In Array(Global Variable(BallPositions), 0)) < -12;
}
actions
{
Global.MovingDirection = 1;
Set Global Variable(MovingDirection, 1);
}
}
rule("Is ball out of bounds on the positive side")
{
event
{
Ongoing - Global;
}
conditions
{
Global.Mode == 3;
Global.IsInPregame != True;
Z Component Of(Global.BallPositions[0]) > 12;
Global Variable(Mode) == 3;
Global Variable(IsInPregame) != True;
Z Component Of(Value In Array(Global Variable(BallPositions), 0)) > 12;
}
actions
{
Global.MovingDirection = -1;
Set Global Variable(MovingDirection, -1);
}
}