Create
Return to post

Comparing difference between and

View raw
  • settings
  • {
  • main
  • {
  • Description: "Mei rework using HOTS abilities, and more. Made by Mitsiee. More info at workshop.codes/mei-hots."
  • Description: "Mei rework using HOTS abilities. Made by Mitsiee. More info at workshop.codes/mei-hots."
  • }
  • modes
  • {
  • Assault
  • {
  • enabled maps
  • {
  • }
  • }
  • Control
  • {
  • enabled maps
  • {
  • }
  • }
  • Deathmatch
  • {
  • enabled maps
  • {
  • }
  • }
  • Escort
  • {
  • enabled maps
  • {
  • }
  • }
  • Hybrid
  • {
  • enabled maps
  • {
  • }
  • }
  • Skirmish
  • {
  • enabled maps
  • {
  • }
  • }
  • Team Deathmatch
  • {
  • enabled maps
  • {
  • Workshop Chamber
  • }
  • }
  • General
  • {
  • Limit Roles: 2 Of Each Role Per Team
  • Respawn Time Scalar: 20%
  • }
  • }
  • heroes
  • {
  • General
  • {
  • Mei
  • {
  • Ammunition Clip Size Scalar: 117%
  • Ultimate Generation - Combat Blizzard: 500%
  • Ultimate Generation - Passive Blizzard: 300%
  • Ultimate Generation Blizzard: 300%
  • Weapon Freeze Duration Scalar: 115%
  • }
  • enabled heroes
  • {
  • Mei
  • }
  • }
  • }
  • workshop
  • {
  • Enable Snowball instead of regular right click: On
  • Icing Cooldown: 6.000
  • Icing Duration: 5.000
  • Snowball AoE Radius: 1.500
  • Snowball time between shots: 0.500
  • Use seperate ammo pool for Primary and Secondary fire: On
  • - Override Cryofreeze instead of Ice Wall: On
  • }
  • }
  • variables
  • {
  • global:
  • 0: AvalancheRadius
  • 1: AvalancheDuration
  • 2: IcingMaxRange
  • 3: IcingSteps
  • 4: IcingRadius
  • 5: IcingDuration
  • 6: IcingAbilityOverrideCryofreeze
  • 7: IsMeiTank
  • 8: IcingCooldown
  • 9: AvalancheMaxSpeed
  • 10: IcingEnabled
  • 11: BlizzardFlySpeed
  • 12: BlizzardGravityStrength
  • 13: BlizzardCooldown
  • 14: BlizzardOverrideCryofreeze
  • 15: BlizzardEnabled
  • 16: BlizzardDamagePerSecond
  • 17: BlizzardRadius
  • 18: BlizzardMovementSlow
  • 19: BlizzardDuration
  • 20: MeiTankHealth
  • 21: SnowballFlySpeed
  • 22: SnowballGravityStrength
  • 24: SnowballDamage
  • 25: MaxIceArmor
  • 26: OverchargeRate
  • 27: IsWeaponOvercharge
  • 28: OverchargeDelay
  • 29: DoesOverchargeUseAmmo
  • 30: OverchargeMaxAmmo
  • 31: DischargeRate
  • 32: IsBlizzardAroundPlayer
  • 33: IcingOverwritesButton
  • 34: OverwriteButtonArray
  • 35: IcingMinSpeed
  • 36: IcingMaxSpeed
  • 37: AvalancheEnabled
  • 38: AvalancheDamagePerTick
  • 39: AvalancheDamageExplosion
  • 40: BlizzardOverwritesButton
  • 41: IcingDamageOnImpact
  • 43: IcingSlow
  • 44: IcingFreezeOnImpact
  • 45: IcingSpeedIncrease
  • 46: IcingType
  • 47: SeparateAmmoEnabled
  • 48: MaxAmmoPrimary
  • 49: MaxAmmoSecondary
  • 50: SeparateAmmoAutoReload
  • 51: SnowballEnabled
  • 52: SnowballDelay
  • 53: SnowballDamageAoE
  • 54: SnowballAoERadius
  • player:
  • 0: IsUsingAvalanche
  • 1: AvalancheEffects
  • 2: AvalancheLoop
  • 3: AvalancheSpeed
  • 4: AvalancheCurrentRadius
  • 5: AvalancheFacingDirection
  • 6: AvalancheFinalPosition
  • 8: PlayersInAvalanche
  • 9: IcingEffects
  • 10: IcingCreateStep
  • 11: IcingEndPosition
  • 12: IcingStartPosition
  • 13: IcingStepPositions
  • 14: IcingCurrentSpeed
  • 15: IcingSnowballEffect
  • 16: BlizzardRaycastFire
  • 17: BlizzardShootLoop
  • 18: BlizzardCurrentCheckPosition
  • 19: BlizzardBallsFlying
  • 20: BlizzardActive
  • 21: BlizzardRaycastDistance
  • 22: BlizzardPreviousPosition
  • 23: EnemiesInBlizzard
  • 24: BlizzardFacingDirection
  • 25: BlizzardEyeLocationWhenFired
  • 26: BlizzardFinalPosition
  • 27: BlizzardIceArmor
  • 28: SnowballRaycastFire
  • 29: SnowballShootLoop
  • 30: SnowballCurrentCheckPosition
  • 31: SnowballsFlying
  • 31: SnowballBallsFlying
  • 32: SnowballActive
  • 33: SnowballRaycastDistance
  • 34: SnowballPreviousPosition
  • 35: SnowballFacingDirection
  • 36: SnowballEyeLocationWhenFired
  • 37: SnowballFinalPosition
  • 38: CurrentWeaponCharge
  • 39: WeaponIsOverheated
  • 40: AvalancheTimer
  • 41: IcingActiveCooldown
  • 42: BlizzardActiveCooldown
  • 43: IcingPlayersDamaged
  • 44: IcingPlayersToDamage
  • 45: InIcingOfPlayer
  • 46: CurrentAmmoPrimary
  • 47: CurrentAmmoSecondary
  • 48: SnowballEffects
  • 49: SnowballLoop
  • }
  • subroutines
  • {
  • 0: SetAvalancheCamera
  • 1: ChaseAvalancheSpeed
  • 2: ChaseAvalancheRadius
  • 3: ClearAvalanche
  • 4: ExplodeAvalanche
  • 5: ExplodePlayersInAvalanche
  • 6: ClearIcing
  • 7: ChaseIcingSpeed
  • 8: IcingFreezeAndDamageOnImpact
  • 9: CreateSnowballEffects
  • 10: DestroyCurrentSnowball
  • 11: AddSnowball
  • 12: SnowballDamage
  • }
  • rule("Spawn bots - For debugging")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Is Button Held(Event Player, Button(Crouch)) == True;
  • Is Button Held(Event Player, Button(Interact)) == True;
  • Is Button Held(Event Player, Crouch) == True;
  • Is Button Held(Event Player, Interact) == True;
  • }
  • actions
  • {
  • Create Dummy Bot(Random Value In Array(All Heroes), Opposite Team Of(Team Of(Event Player)), -1,
  • Event Player + Facing Direction Of(Event Player) * 0.500, Facing Direction Of(Event Player));
  • Wait(1, Ignore Condition);
  • Press Button(Filtered Array(All Players(All Teams), Current Array Element != Event Player), Button(Interact));
  • }
  • }
  • disabled rule("Mei bot using icing")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • Mei;
  • }
  • conditions
  • {
  • Is Dummy Bot(Event Player) == True;
  • }
  • actions
  • {
  • Wait(1, Ignore Condition);
  • Start Holding Button(Event Player, Button(Secondary Fire));
  • Wait(0.500, Ignore Condition);
  • Stop Holding Button(Event Player, Button(Secondary Fire));
  • Loop;
  • Press Button(Filtered Array(All Players(All Teams), Current Array Element != Event Player), Interact);
  • }
  • }
  • rule("HUD")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • actions
  • {
  • Create HUD Text(All Players(All Teams), Null, Custom String("Press [Crouch] + [Interact] to Spawn a random bot"), Null, Right, 0,
  • Color(White), Color(Aqua), Color(White), Visible To and String, Default Visibility);
  • }
  • }
  • rule("Initial")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • actions
  • {
  • Global.OverwriteButtonArray = Array(Null, Button(Primary Fire), Button(Secondary Fire), Button(Ability 1), Button(Ability 2));
  • White, Aqua, White, Visible To and String, Default Visibility);
  • }
  • }
  • disabled rule("--- Avalanche")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • }
  • rule("Initialise Avalanche")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • actions
  • {
  • Global.AvalancheEnabled = Workshop Setting Toggle(Custom String("Avalanche ability (Ultimate)"), Custom String(
  • "Enable Avalanche instead of regular Ultimate"), True, 0);
  • Global.AvalancheRadius = Workshop Setting Real(Custom String("Avalanche ability (Ultimate)"), Custom String("Avalanche Radius"), 2,
  • 1, 3, 1);
  • Global.AvalancheDuration = Workshop Setting Real(Custom String("Avalanche ability (Ultimate)"), Custom String(
  • "Avalanche Duration"), 3, 1, 5, 2);
  • Global.AvalancheMaxSpeed = Workshop Setting Integer(Custom String("Avalanche ability (Ultimate)"), Custom String(
  • "Avalanche max speed"), 200, 100, 400, 3);
  • Global.AvalancheDamagePerTick = Workshop Setting Real(Custom String("Avalanche ability (Ultimate)"), Custom String(
  • "Damage per tick while players are attached"), 1.500, 0, 10, 4);
  • Global.AvalancheDamageExplosion = Workshop Setting Real(Custom String("Avalanche ability (Ultimate)"), Custom String(
  • "Damage on explode"), 50, 0, 500, 5);
  • }
  • }
  • rule("Avalanche Progress Bar HUD element")
  • rule("Disable original Ultimate")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • Mei;
  • }
  • conditions
  • {
  • Global.AvalancheEnabled == True;
  • All;
  • }
  • actions
  • {
  • Create Progress Bar HUD Text(Filtered Array(Event Player, Event Player.IsUsingAvalanche),
  • 100 / Global.AvalancheDuration * Event Player.AvalancheTimer, Custom String(""), Top, 10, Color(Aqua), Color(Aqua),
  • Visible To Values and Color, Default Visibility);
  • "New lines to push the progress bar down"
  • Create HUD Text(Filtered Array(Event Player, Event Player.IsUsingAvalanche), Null, Custom String(
  • " \r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n"),
  • Null, Top, 9, Color(White), Color(White), Color(White), Visible To and String, Default Visibility);
  • Disallow Button(Event Player, Ultimate);
  • }
  • }
  • rule("Disable original Ultimate")
  • rule("Initialise Avalanche")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • Mei;
  • }
  • conditions
  • {
  • Global.AvalancheEnabled == True;
  • Ongoing - Global;
  • }
  • actions
  • {
  • Disallow Button(Event Player, Button(Ultimate));
  • Global.AvalancheRadius = Workshop Setting Real(Custom String("Avalanche ability (Ultimate)"), Custom String("Avalanche Radius"), 2,
  • 1, 3);
  • Global.AvalancheDuration = Workshop Setting Real(Custom String("Avalanche ability (Ultimate)"), Custom String(
  • "Avalanche Duration"), 3, 1, 5);
  • Global.AvalancheMaxSpeed = Workshop Setting Integer(Custom String("Avalanche ability (Ultimate)"), Custom String(
  • "Avalanche max speed"), 200, 100, 400);
  • }
  • }
  • rule("Player presses Ultimate")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • Mei;
  • All;
  • }
  • conditions
  • {
  • Global.AvalancheEnabled == True;
  • Is Alive(Event Player) == True;
  • Ultimate Charge Percent(Event Player) == 100;
  • Is Button Held(Event Player, Button(Ultimate)) == True;
  • Is Using Ability 1(Event Player) != True;
  • Is Button Held(Event Player, Ultimate) == True;
  • Event Player.IsUsingAvalanche != True;
  • }
  • actions
  • {
  • Event Player.IsUsingAvalanche = True;
  • "Set timer and chase it down"
  • Event Player.AvalancheTimer = Global.AvalancheDuration;
  • Chase Player Variable Over Time(Event Player, AvalancheTimer, 0, Global.AvalancheDuration, Destination and Duration);
  • "Communicate, for fun"
  • Communicate(Event Player, Incoming);
  • Wait(Global.AvalancheDuration + 0.500, Ignore Condition);
  • Set Ultimate Charge(Event Player, 0);
  • }
  • }
  • rule("Player is using Avalanche")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Event Player.IsUsingAvalanche == True;
  • }
  • actions
  • {
  • "Set initial facing direction"
  • Event Player.AvalancheFacingDirection = Facing Direction Of(Event Player);
  • Event Player.PlayersInAvalanche = Empty Array;
  • "Set player to \"Phased Out\" so they don't collide with others and can't be hit, as well as clearing all debuffs"
  • Set Status(Event Player, Null, Phased Out, Global.AvalancheDuration);
  • "Call relevant rules"
  • Start Rule(ChaseAvalancheSpeed, Do Nothing);
  • Start Rule(ChaseAvalancheRadius, Do Nothing);
  • Call Subroutine(SetAvalancheCamera);
  • "Start forcing the player forwards"
  • Start Forcing Throttle(Event Player, 1, 1, 0, 0, 0, 0);
  • "Create a bunch of effects that make up the ability"
  • "Effects"
  • Event Player.AvalancheEffects = Empty Array;
  • "Spheres"
  • Create Effect(All Players(All Teams), Sphere, Color(White), Event Player, Event Player.AvalancheCurrentRadius,
  • Create Effect(All Players(All Teams), Sphere, White, Event Player, Event Player.AvalancheCurrentRadius,
  • Visible To Position and Radius);
  • Event Player.AvalancheEffects = Append To Array(Event Player.AvalancheEffects, Last Created Entity);
  • Create Effect(All Players(All Teams), Sphere, Team Of(Event Player), Event Player, Event Player.AvalancheCurrentRadius,
  • Create Effect(All Players(All Teams), Sphere, Aqua, Event Player, Event Player.AvalancheCurrentRadius,
  • Visible To Position and Radius);
  • Event Player.AvalancheEffects = Append To Array(Event Player.AvalancheEffects, Last Created Entity);
  • "Sparkles"
  • Create Effect(All Players(All Teams), Sparkles, Color(White), Update Every Frame(Position Of(Event Player)),
  • Event Player.AvalancheCurrentRadius * 2, Visible To Position and Radius);
  • Create Effect(All Players(All Teams), Sparkles, White, Position Of(Event Player), Event Player.AvalancheCurrentRadius * 2,
  • Visible To Position and Radius);
  • Event Player.AvalancheEffects = Append To Array(Event Player.AvalancheEffects, Last Created Entity);
  • Create Effect(All Players(All Teams), Sparkles, Team Of(Event Player), Update Every Frame(Position Of(Event Player)),
  • Event Player.AvalancheCurrentRadius * 2, Visible To Position and Radius);
  • Create Effect(All Players(All Teams), Sparkles, Aqua, Position Of(Event Player), Event Player.AvalancheCurrentRadius * 2,
  • Visible To Position and Radius);
  • Event Player.AvalancheEffects = Append To Array(Event Player.AvalancheEffects, Last Created Entity);
  • "Clouds"
  • Create Effect(All Players(All Teams), Cloud, Color(White), Update Every Frame(Position Of(Event Player)),
  • Event Player.AvalancheCurrentRadius * 2, Visible To Position and Radius);
  • Create Effect(All Players(All Teams), Cloud, White, Position Of(Event Player), Event Player.AvalancheCurrentRadius * 2,
  • Visible To Position and Radius);
  • Event Player.AvalancheEffects = Append To Array(Event Player.AvalancheEffects, Last Created Entity);
  • Create Effect(All Players(All Teams), Cloud, Team Of(Event Player), Update Every Frame(Position Of(Event Player)),
  • Event Player.AvalancheCurrentRadius * 2, Visible To Position and Radius);
  • Create Effect(All Players(All Teams), Cloud, Aqua, Position Of(Event Player), Event Player.AvalancheCurrentRadius * 2,
  • Visible To Position and Radius);
  • Event Player.AvalancheEffects = Append To Array(Event Player.AvalancheEffects, Last Created Entity);
  • "Wait before clearing avalanche"
  • Wait(Global.AvalancheDuration, Abort When False);
  • Call Subroutine(ClearAvalanche);
  • }
  • }
  • rule("Subroutine - Set Avalanche camera")
  • {
  • event
  • {
  • Subroutine;
  • SetAvalancheCamera;
  • }
  • actions
  • {
  • "Force the player to third person"
  • Start Camera(Event Player, Ray Cast Hit Position(Eye Position(Event Player) + Up * 0.500, Eye Position(Event Player)
  • + Up * 0.500 + Event Player.AvalancheFacingDirection * -5, All Players(All Teams), Event Player, True), Ray Cast Hit Position(
  • Eye Position(Event Player), Eye Position(Event Player) + Event Player.AvalancheFacingDirection * 20, Null, Event Player,
  • False), 60);
  • }
  • }
  • rule("Subroutine - Chase Avalanche Speed")
  • {
  • event
  • {
  • Subroutine;
  • ChaseAvalancheSpeed;
  • }
  • actions
  • {
  • "Gradually increase the player speed"
  • For Player Variable(Event Player, AvalancheSpeed, 100, Global.AvalancheMaxSpeed, (Global.AvalancheMaxSpeed - 100) / 60);
  • Set Move Speed(Event Player, Event Player.AvalancheSpeed);
  • Wait(0.016, Ignore Condition);
  • End;
  • }
  • }
  • rule("Subroutine - Chase Avalanche Radius")
  • {
  • event
  • {
  • Subroutine;
  • ChaseAvalancheRadius;
  • }
  • actions
  • {
  • Event Player.AvalancheCurrentRadius = 0.750;
  • "Gradually increase the size of the snowball"
  • Chase Player Variable Over Time(Event Player, AvalancheCurrentRadius, Global.AvalancheRadius, Global.AvalancheDuration / 2,
  • Destination and Duration);
  • Event Player.AvalancheCurrentRadius = 1;
  • Chase Player Variable Over Time(Event Player, AvalancheCurrentRadius, Global.AvalancheRadius, 1.500, Destination and Duration);
  • }
  • }
  • rule("Subroutine - Clear Avalanche")
  • {
  • event
  • {
  • Subroutine;
  • ClearAvalanche;
  • }
  • actions
  • {
  • "Root the player while the effect is clearing"
  • Set Status(Event Player, Null, Rooted, 1);
  • Chase Player Variable Over Time(Event Player, AvalancheCurrentRadius, 0, 0.750, Destination and Duration);
  • Event Player.AvalancheSpeed = 500;
  • Event Player.IsUsingAvalanche = False;
  • Event Player.AvalancheFinalPosition = Position Of(Event Player);
  • Stop Forcing Throttle(Event Player);
  • Set Move Speed(Event Player, 100);
  • Call Subroutine(ExplodeAvalanche);
  • "Destroy Effects"
  • For Player Variable(Event Player, AvalancheLoop, 0, Count Of(Event Player.AvalancheEffects), 1);
  • Destroy Effect(Event Player.AvalancheEffects[Event Player.AvalancheLoop]);
  • End;
  • "Clear statuses"
  • Clear Status(Event Player, Invincible);
  • Clear Status(Event Player, Rooted);
  • Clear Status(Event Player, Phased Out);
  • "Reset camera to normal"
  • Stop Camera(Event Player);
  • }
  • }
  • rule("Subroutine - Explode Avalanche")
  • {
  • event
  • {
  • Subroutine;
  • ExplodeAvalanche;
  • }
  • actions
  • {
  • Start Rule(ExplodePlayersInAvalanche, Do Nothing);
  • "Play a bunch of effects when the ability has come to a stop"
  • Play Effect(All Players(All Teams), Explosion Sound, Color(White), Event Player, 100);
  • Play Effect(All Players(All Teams), Good Explosion, Color(White), Event Player.AvalancheFinalPosition + Up,
  • Global.AvalancheRadius * 2);
  • Play Effect(All Players(All Teams), Ring Explosion, Color(White), Event Player.AvalancheFinalPosition, Global.AvalancheRadius * 4);
  • Play Effect(All Players(All Teams), Explosion Sound, White, Event Player, 100);
  • Play Effect(All Players(All Teams), Good Explosion, White, Event Player.AvalancheFinalPosition + Up, Global.AvalancheRadius * 2);
  • Play Effect(All Players(All Teams), Ring Explosion, White, Event Player.AvalancheFinalPosition, Global.AvalancheRadius * 4);
  • Wait(0.050, Ignore Condition);
  • Play Effect(All Players(All Teams), Good Explosion, Team Of(Event Player), Event Player.AvalancheFinalPosition + Up,
  • Global.AvalancheRadius * 2);
  • Play Effect(All Players(All Teams), Ring Explosion, Team Of(Event Player), Event Player.AvalancheFinalPosition,
  • Global.AvalancheRadius * 4);
  • Play Effect(All Players(All Teams), Good Explosion, Aqua, Event Player.AvalancheFinalPosition + Up, Global.AvalancheRadius * 2);
  • Play Effect(All Players(All Teams), Ring Explosion, Aqua, Event Player.AvalancheFinalPosition, Global.AvalancheRadius * 4);
  • Wait(0.150, Ignore Condition);
  • Play Effect(All Players(All Teams), Ring Explosion, Color(White), Event Player.AvalancheFinalPosition, Global.AvalancheRadius * 4);
  • Play Effect(All Players(All Teams), Ring Explosion, White, Event Player.AvalancheFinalPosition, Global.AvalancheRadius * 4);
  • Wait(0.050, Ignore Condition);
  • Play Effect(All Players(All Teams), Ring Explosion, Team Of(Event Player), Event Player.AvalancheFinalPosition,
  • Global.AvalancheRadius * 4);
  • Play Effect(All Players(All Teams), Ring Explosion, Aqua, Event Player.AvalancheFinalPosition, Global.AvalancheRadius * 4);
  • Wait(0.150, Ignore Condition);
  • Play Effect(All Players(All Teams), Ring Explosion, Color(White), Event Player.AvalancheFinalPosition, Global.AvalancheRadius * 4);
  • Play Effect(All Players(All Teams), Ring Explosion, White, Event Player.AvalancheFinalPosition, Global.AvalancheRadius * 4);
  • Wait(0.050, Ignore Condition);
  • Play Effect(All Players(All Teams), Ring Explosion, Team Of(Event Player), Event Player.AvalancheFinalPosition,
  • Global.AvalancheRadius * 4);
  • Play Effect(All Players(All Teams), Ring Explosion, Aqua, Event Player.AvalancheFinalPosition, Global.AvalancheRadius * 4);
  • Wait(0.250, Ignore Condition);
  • }
  • }
  • rule("Subroutine - Explode Players in Avalanche")
  • {
  • event
  • {
  • Subroutine;
  • ExplodePlayersInAvalanche;
  • }
  • actions
  • {
  • Wait(0.250, Ignore Condition);
  • "Play explosion sound at position of player"
  • Play Effect(All Players(All Teams), Explosion Sound, Color(White), Event Player, 100);
  • "Communicate, for fun"
  • Play Effect(All Players(All Teams), Explosion Sound, White, Event Player, 100);
  • Communicate(Event Player, Sorry);
  • "Detach players"
  • While(Count Of(Event Player.PlayersInAvalanche) > 0);
  • "Detach victom from snowball"
  • Detach Players(First Of(Event Player.PlayersInAvalanche));
  • "Teleport the player just in case they ended up in a wall"
  • Teleport(First Of(Event Player.PlayersInAvalanche), Nearest Walkable Position(Position Of(First Of(
  • Event Player.PlayersInAvalanche))));
  • Wait(0.016, Ignore Condition);
  • "Damage affected players"
  • Damage(First Of(Event Player.PlayersInAvalanche), Event Player, Global.AvalancheDamageExplosion);
  • "Throw players in avalanche away from Mei"
  • Damage(First Of(Event Player.PlayersInAvalanche), Event Player, 50);
  • Apply Impulse(First Of(Event Player.PlayersInAvalanche), Up, 5, To World, Cancel Contrary Motion);
  • Apply Impulse(First Of(Event Player.PlayersInAvalanche), Direction Towards(Position Of(Event Player), Position Of(First Of(
  • Event Player.PlayersInAvalanche))), 15, To World, Incorporate Contrary Motion);
  • "Clear frozen status"
  • Clear Status(First Of(Event Player.PlayersInAvalanche), Frozen);
  • Wait(0.016, Ignore Condition);
  • "Knock players down while in the air"
  • Set Status(First Of(Event Player.PlayersInAvalanche), Event Player, Knocked Down, 2);
  • Event Player.PlayersInAvalanche = Remove From Array(Event Player.PlayersInAvalanche, First Of(Event Player.PlayersInAvalanche));
  • End;
  • "Clear array, just in case"
  • Event Player.PlayersInAvalanche = Empty Array;
  • }
  • }
  • rule("Avalanche is active, set facing direction")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Event Player.IsUsingAvalanche == True;
  • }
  • actions
  • {
  • "Force facing direction of Mei in direction Avalanche was used"
  • Set Facing(Event Player, Event Player.AvalancheFacingDirection, To World);
  • Wait(0.016, Abort When False);
  • Loop If Condition Is True;
  • }
  • }
  • rule("Avalanche is active, play sound")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Event Player.IsUsingAvalanche == True;
  • }
  • actions
  • {
  • "Play a constant sound while snowball is rolling"
  • Play Effect(All Players(All Teams), Debuff Impact Sound, Color(White), Event Player, 50);
  • Play Effect(All Players(All Teams), Ring Explosion, Color(White), Position Of(Event Player),
  • Event Player.AvalancheCurrentRadius * 2);
  • Wait(0.096, Abort When False);
  • Play Effect(All Players(All Teams), Debuff Impact Sound, White, Event Player, 50);
  • Wait(0.050, Abort When False);
  • Loop If Condition Is True;
  • }
  • }
  • rule("Avalanche hit a wall")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Event Player.IsUsingAvalanche == True;
  • Speed Of(Event Player) < 5 * (Event Player.AvalancheSpeed / 100);
  • }
  • actions
  • {
  • Wait(0.100, Abort When False);
  • Call Subroutine(ClearAvalanche);
  • Set Facing(Event Player, Event Player.AvalancheFacingDirection * -1, To World);
  • }
  • }
  • rule("Enemy is inside Avalanche")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • "If any player is using avalanche"
  • Count Of(Filtered Array(All Players(Opposite Team Of(Team Of(Event Player))), Current Array Element.IsUsingAvalanche == True)) > 0;
  • "If event player is near anyone using avalanche"
  • Is True For Any(Filtered Array(All Players(Opposite Team Of(Team Of(Event Player))), Current Array Element.IsUsingAvalanche),
  • Distance Between(Position Of(Event Player), Position Of(Current Array Element))
  • < Current Array Element.AvalancheCurrentRadius * 1.250) == True;
  • }
  • actions
  • {
  • Closest Player To(Position Of(Event Player), Opposite Team Of(Team Of(Event Player))).PlayersInAvalanche = Append To Array(
  • Closest Player To(Position Of(Event Player), Opposite Team Of(Team Of(Event Player))).PlayersInAvalanche, Event Player);
  • Attach Players(Event Player, Closest Player To(Position Of(Event Player), Opposite Team Of(Team Of(Event Player))),
  • Local Vector Of(Position Of(Event Player), Closest Player To(Position Of(Event Player), Opposite Team Of(Team Of(
  • Event Player))), Rotation And Translation));
  • Set Status(Event Player, Null, Frozen, 5);
  • }
  • }
  • rule("Damage players inside of Avalanche")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Event Player.IsUsingAvalanche == True;
  • }
  • actions
  • {
  • Damage(Event Player.PlayersInAvalanche, Event Player, Global.AvalancheDamagePerTick);
  • Damage(Event Player.PlayersInAvalanche, Event Player, 1.500);
  • Wait(0.050, Ignore Condition);
  • Loop If Condition Is True;
  • }
  • }
  • disabled rule("--- Icing")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • }
  • rule("Initialise Icing")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • actions
  • {
  • "Workshop setting that determines what button icing will use, opening this action might be laggy."
  • Global.IcingOverwritesButton = Workshop Setting Combo(Custom String("Icing ability"), Custom String(
  • "What button should Icing overwrite?"), 0, Array(Custom String("None"), Custom String("Primary Fire"), Custom String(
  • "Secondary Fire"), Custom String("Ability 1 (Cryofreeze)"), Custom String("Ability 2 (Ice Wall)")), -10);
  • "Set the variable from the combo index to the actual button"
  • Global.IcingOverwritesButton = Global.OverwriteButtonArray[Global.IcingOverwritesButton];
  • "Max range"
  • Global.IcingMaxRange = Workshop Setting Real(Custom String("Icing ability"), Custom String("Icing max range"), 20, 5, 50, 3);
  • "Icing steps (more = more accurate, but more effects used)"
  • Global.IcingEnabled = Workshop Setting Toggle(Custom String("Icing ability"), Custom String(
  • "-- Is Icing enabled? (Only use Icing or Blizzard, not both)"), True);
  • Global.IcingAbilityOverrideCryofreeze = Workshop Setting Toggle(Custom String("Icing ability"), Custom String(
  • "- Override Cryofreeze instead of Ice Wall"), False) ? True : False;
  • Global.IcingMaxRange = Workshop Setting Real(Custom String("Icing ability"), Custom String("Icing max range"), 20, 5, 100);
  • Global.IcingSteps = Workshop Setting Integer(Custom String("Icing ability"), Custom String(
  • "Steps (Higher = more circles on the ground)"), 20, 5, 50, 5);
  • "Width of icing"
  • Global.IcingRadius = Workshop Setting Real(Custom String("Icing ability"), Custom String("Icing radius (width)"), 1.500, 0.500, 5,
  • 4);
  • "Duration of icing"
  • Global.IcingDuration = Workshop Setting Real(Custom String("Icing ability"), Custom String("Icing Duration"), 8, 0, 20, 2);
  • "Cooldown of icing"
  • Global.IcingCooldown = Workshop Setting Real(Custom String("Icing ability"), Custom String("Icing Cooldown"), 10, 0, 100, 1);
  • "Icing min player speed"
  • Global.IcingMinSpeed = Workshop Setting Integer(Custom String("Icing ability"), Custom String(
  • "Minimum speed when standing on icing (Percentage relative to regular move speed)"), 200, 100, 400, 6);
  • "Icing max player speed"
  • Global.IcingMaxSpeed = Workshop Setting Integer(Custom String("Icing ability"), Custom String(
  • "Maximum speed when standing on icing (Percentage relative to regular move speed)"), 300, 200, 500, 7);
  • "Icing damage on impact"
  • Global.IcingDamageOnImpact = Workshop Setting Integer(Custom String("Icing ability"), Custom String(
  • "Damage on impact of initial Icing hit"), 0, 0, 200, 8);
  • "Icing freeze on impact"
  • Global.IcingFreezeOnImpact = Workshop Setting Real(Custom String("Icing ability"), Custom String(
  • "Freeze duration on impact of initial Icing hit"), 0, 0, 3, 9);
  • "Set how icing is used"
  • Global.IcingType = Workshop Setting Combo(Custom String("Icing ability"), Custom String("Icing type - How does Icing function?"),
  • 0, Array(Custom String("Create a straight path that \"slides\" teammates from point X to point Y"), Custom String(
  • "Create a straight path that grants a static movement speed buff to teammates")), -1);
  • "Icing slow"
  • Global.IcingSlow = Workshop Setting Integer(Custom String("Icing ability"), Custom String("Slow for enemies walking over icing"),
  • 0, 0, 100, 20);
  • "Movement increase for teammates walking on Icing (if Icing type is set to option 2)"
  • Global.IcingSpeedIncrease = Workshop Setting Integer(Custom String("Icing ability"), Custom String(
  • "Movement increase for teammates walking on Icing (if Icing type is set to option 2)"), 15, 0, 200, 21);
  • }
  • }
  • rule("Icing Cooldown HUD if icing is on Primary or Secondary fire")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • Mei;
  • }
  • conditions
  • {
  • Global.IcingOverwritesButton != Null;
  • (Global.IcingOverwritesButton == Button(Primary Fire) || Global.IcingOverwritesButton == Button(Secondary Fire)) == True;
  • }
  • actions
  • {
  • Create HUD Text(Filtered Array(Event Player, Hero Of(Event Player) == Hero(Mei) && True), Null, Custom String(
  • " \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"), Custom String(" \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"), Right, 99, Null, Color(White),
  • Color(White), Visible To String and Color, Default Visibility);
  • Create HUD Text(Filtered Array(Event Player, Hero Of(Event Player) == Hero(Mei) && True), Custom String("Icing: {0}",
  • Event Player.IcingActiveCooldown), Null, Null, Right, 100, Event Player.IcingActiveCooldown ? Color(Red) : Color(Aqua), Color(
  • White), Color(White), Visible To String and Color, Default Visibility);
  • "Steps (Higher = more circles on the ground)"), 20, 5, 50);
  • Global.IcingRadius = Workshop Setting Real(Custom String("Icing ability"), Custom String("Icing radius (width)"), 1.500, 0.500, 5);
  • Global.IcingDuration = Workshop Setting Real(Custom String("Icing ability"), Custom String("Icing Duration"), 8, 0, 100);
  • Global.IcingCooldown = Workshop Setting Real(Custom String("Icing ability"), Custom String("Icing Cooldown"), 10, 0, 100);
  • }
  • }
  • rule("Disable original Ability")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Global.IcingOverwritesButton != Null;
  • Hero Of(Event Player) == Hero(Mei);
  • Global.IcingEnabled == True;
  • }
  • actions
  • {
  • Disallow Button(Event Player, Global.IcingOverwritesButton);
  • If(Global.IcingAbilityOverrideCryofreeze);
  • Disallow Button(Event Player, Ability 1);
  • Else;
  • Disallow Button(Event Player, Ability 2);
  • End;
  • }
  • }
  • rule("Presses Ability")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Global.IcingOverwritesButton != Null;
  • Hero Of(Event Player) == Hero(Mei);
  • Is Alive(Event Player) == True;
  • Is Button Held(Event Player, Global.IcingOverwritesButton) == True;
  • Ability Cooldown(Event Player, Global.IcingOverwritesButton) == 0;
  • Event Player.IcingActiveCooldown == 0;
  • Event Player.IsUsingAvalanche != True;
  • Global.IcingEnabled == True;
  • (Global.IcingAbilityOverrideCryofreeze ? Is Button Held(Event Player, Ability 1) : Is Button Held(Event Player, Ability 2))
  • == True;
  • (Global.IcingAbilityOverrideCryofreeze ? Ability Cooldown(Event Player, Button(Ability 1)) == 0 : Ability Cooldown(Event Player,
  • Button(Ability 2)) == 0) == True;
  • }
  • actions
  • {
  • "Set cooldown of button used for Icing"
  • Set Ability Cooldown(Event Player, Global.IcingOverwritesButton, Global.IcingCooldown);
  • Event Player.IcingActiveCooldown = Global.IcingCooldown;
  • Event Player.IcingPlayersDamaged = Empty Array;
  • Chase Player Variable Over Time(Event Player, IcingActiveCooldown, 0, Global.IcingCooldown, Destination and Duration);
  • "Communite, for extra flare"
  • Set Ability Cooldown(Event Player, Global.IcingAbilityOverrideCryofreeze ? Button(Ability 1) : Button(Ability 2),
  • Global.IcingCooldown);
  • Communicate(Event Player, Going In);
  • "Reset icing"
  • Event Player.IcingEffects = Empty Array;
  • Event Player.IcingStepPositions = Empty Array;
  • "set the start of icing right in front of the player"
  • Event Player.IcingStartPosition = Vector(X Component Of(Eye Position(Event Player) + Facing Direction Of(Event Player) * (
  • Global.IcingRadius + 1)), Y Component Of(Eye Position(Event Player)), Z Component Of(Eye Position(Event Player)
  • + Facing Direction Of(Event Player) * (Global.IcingRadius + 1)));
  • "Set the end position, always at the same eye position as event player"
  • Event Player.IcingEndPosition = Ray Cast Hit Position(Eye Position(Event Player), Vector(X Component Of(Eye Position(Event Player)
  • + Facing Direction Of(Event Player) * Global.IcingMaxRange), Y Component Of(Eye Position(Event Player)), Z Component Of(
  • Eye Position(Event Player) + Facing Direction Of(Event Player) * Global.IcingMaxRange)), Null, Null, False);
  • "Snowball!"
  • Create Effect(All Players(All Teams), Sphere, Color(Sky Blue), Last Of(Event Player.IcingStepPositions) + Up * 3, 0.250,
  • Create Effect(All Players(All Teams), Good Aura, Sky Blue, Last Of(Event Player.IcingStepPositions) + Up * 3, 0.250,
  • Visible To Position and Radius);
  • Event Player.IcingSnowballEffect = Last Created Entity;
  • Play Effect(All Players(All Teams), Buff Impact Sound, Color(White), Event Player, 100);
  • Play Effect(All Players(All Teams), Buff Impact Sound, White, Event Player, 100);
  • "Loop to create effects and array for Icing location"
  • For Player Variable(Event Player, IcingCreateStep, 0, Global.IcingMaxRange, Global.IcingMaxRange / Global.IcingSteps);
  • "Set position of next icing circle"
  • Event Player.IcingStepPositions = Append To Array(Event Player.IcingStepPositions,
  • Event Player.IcingStartPosition + Direction Towards(Event Player.IcingStartPosition, Event Player.IcingEndPosition)
  • * Event Player.IcingCreateStep);
  • "Cast icing down in case we're going over slopes"
  • Event Player.IcingStepPositions[Index Of Array Value(Event Player.IcingStepPositions, Last Of(Event Player.IcingStepPositions))
  • ] = Ray Cast Hit Position(Last Of(Event Player.IcingStepPositions), Last Of(Event Player.IcingStepPositions) + Down * 10, Null,
  • Null, False);
  • "Slow enemies hit by the impact, if set by Workshop Setting"
  • Start Rule(IcingFreezeAndDamageOnImpact, Restart Rule);
  • "Create a bunch of cool effects at current position and save them to a variable"
  • Create Effect(All Players(All Teams), Ring, Team Of(Event Player), Last Of(Event Player.IcingStepPositions), Global.IcingRadius,
  • None);
  • Create Effect(All Players(All Teams), Ring, Aqua, Last Of(Event Player.IcingStepPositions), Global.IcingRadius, None);
  • Event Player.IcingEffects = Append To Array(Event Player.IcingEffects, Last Created Entity);
  • Create Effect(All Players(All Teams), Cloud, Color(White), Last Of(Event Player.IcingStepPositions) + Down * 0.250,
  • Global.IcingRadius, None);
  • Create Effect(All Players(All Teams), Cloud, White, Last Of(Event Player.IcingStepPositions) + Down * 0.250, Global.IcingRadius,
  • None);
  • Event Player.IcingEffects = Append To Array(Event Player.IcingEffects, Last Created Entity);
  • Create Effect(All Players(All Teams), Sparkles, Team Of(Event Player), Last Of(Event Player.IcingStepPositions) + Down * 0.250,
  • Global.IcingRadius, None);
  • Create Effect(All Players(All Teams), Sparkles, Aqua, Last Of(Event Player.IcingStepPositions) + Down * 0.250, Global.IcingRadius,
  • None);
  • Event Player.IcingEffects = Append To Array(Event Player.IcingEffects, Last Created Entity);
  • Play Effect(All Players(All Teams), Ring Explosion, Team Of(Event Player), Last Of(Event Player.IcingStepPositions),
  • Global.IcingRadius * 2);
  • Play Effect(All Players(All Teams), Good Pickup Effect, Color(White), Last Of(Event Player.IcingStepPositions),
  • Global.IcingRadius * 2);
  • Play Effect(All Players(All Teams), Good Pickup Effect, Team Of(Event Player), Last Of(Event Player.IcingStepPositions),
  • Global.IcingRadius * 1);
  • Play Effect(All Players(All Teams), Buff Impact Sound, Color(White), Last Of(Event Player.IcingStepPositions), 25);
  • Play Effect(All Players(All Teams), Ring Explosion, Aqua, Last Of(Event Player.IcingStepPositions), Global.IcingRadius * 2);
  • Play Effect(All Players(All Teams), Good Pickup Effect, White, Last Of(Event Player.IcingStepPositions), Global.IcingRadius * 2);
  • Play Effect(All Players(All Teams), Good Pickup Effect, Aqua, Last Of(Event Player.IcingStepPositions), Global.IcingRadius * 1);
  • Play Effect(All Players(All Teams), Buff Impact Sound, White, Last Of(Event Player.IcingStepPositions), 25);
  • Wait(0.032, Ignore Condition);
  • End;
  • Destroy Effect(Event Player.IcingSnowballEffect);
  • "Clear after delay (duration)"
  • Wait(Global.IcingDuration, Ignore Condition);
  • Call Subroutine(ClearIcing);
  • }
  • }
  • rule("Player is on Icing and Icing Type is set to slide")
  • rule("Player is on Icing")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Global.IcingType == 0;
  • Global.IcingEnabled == True;
  • Count Of(Event Player.IcingStepPositions) > 0;
  • Is True For Any(Event Player.IcingStepPositions, Distance Between(Position Of(Event Player), Current Array Element)
  • < Global.IcingRadius) == True;
  • Is On Ground(Event Player) == True;
  • Is True For Any(Filtered Array(All Players(Team Of(Event Player)), Hero Of(Current Array Element) == Hero(Mei) && Count Of(
  • Current Array Element.IcingStepPositions) > 0).IcingStepPositions, Current Array Element != 0 && Distance Between(
  • Current Array Element, Position Of(Event Player)) < Global.IcingRadius) == True;
  • }
  • actions
  • {
  • Event Player.InIcingOfPlayer = First Of(Filtered Array(All Players(Team Of(Event Player)), Hero Of(Current Array Element) == Hero(
  • Mei) && Count Of(Current Array Element.IcingStepPositions) > 0));
  • Start Forcing Throttle(Event Player, 0, 0, 0, 0, 0, 1);
  • "If player is facing end of icing and moving towards it"
  • If(Speed Of In Direction(Event Player, Direction Towards(Position Of(Event Player),
  • Event Player.InIcingOfPlayer.IcingStartPosition)) > Speed Of In Direction(Event Player, Direction Towards(Position Of(
  • Event Player), Event Player.InIcingOfPlayer.IcingEndPosition)));
  • "Accelerate towards end of icing"
  • Start Accelerating(Event Player, Direction Towards(Event Player.InIcingOfPlayer.IcingEndPosition,
  • Event Player.InIcingOfPlayer.IcingStartPosition), 400, 200, To World, Direction Rate and Max Speed);
  • Start Forcing Throttle(Event Player, 0, 1, 0, 0, 0, 1);
  • If(Speed Of In Direction(Event Player, Direction Towards(Position Of(Event Player), Event Player.IcingStartPosition))
  • > Speed Of In Direction(Event Player, Direction Towards(Position Of(Event Player), Event Player.IcingEndPosition)));
  • Start Accelerating(Event Player, Direction Towards(Event Player.IcingEndPosition, Event Player.IcingStartPosition), 400, 200,
  • To World, Direction Rate and Max Speed);
  • Else;
  • "Accelerate towards start of icing"
  • Start Accelerating(Event Player, Direction Towards(Event Player.InIcingOfPlayer.IcingStartPosition,
  • Event Player.InIcingOfPlayer.IcingEndPosition), 400, 200, To World, Direction Rate and Max Speed);
  • Start Accelerating(Event Player, Direction Towards(Event Player.IcingStartPosition, Event Player.IcingEndPosition), 400, 200,
  • To World, Direction Rate and Max Speed);
  • End;
  • Call Subroutine(ChaseIcingSpeed);
  • }
  • }
  • rule("Player is not on icing and Icing Type is set to slide")
  • rule("Player is not on icing")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Global.IcingType == 0;
  • Is True For Any(Filtered Array(All Players(Team Of(Event Player)), Hero Of(Current Array Element) == Hero(Mei) && Count Of(
  • Current Array Element.IcingStepPositions) > 0).IcingStepPositions, Current Array Element != 0 && Distance Between(
  • Current Array Element, Position Of(Event Player)) < Global.IcingRadius) == False;
  • Global.IcingEnabled == True;
  • Is True For Any(Event Player.IcingStepPositions, Distance Between(Position Of(Event Player), Current Array Element)
  • < Global.IcingRadius) == False;
  • }
  • actions
  • {
  • Wait(0.064, Ignore Condition);
  • Stop Accelerating(Event Player);
  • Event Player.InIcingOfPlayer = Null;
  • "Don't reset speed is using Avalanche"
  • If(Event Player.IsUsingAvalanche != True);
  • Set Move Speed(Event Player, 100);
  • Stop Forcing Throttle(Event Player);
  • End;
  • }
  • }
  • rule("Speed up teammates walking on icing (if enabled)")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Global.IcingType == 1;
  • Is True For Any(Filtered Array(All Players(Team Of(Event Player)), Hero Of(Current Array Element) == Hero(Mei) && Count Of(
  • Current Array Element.IcingStepPositions) > 0).IcingStepPositions, Current Array Element != 0 && Distance Between(
  • Current Array Element, Position Of(Event Player)) < Global.IcingRadius) == True;
  • }
  • actions
  • {
  • Set Move Speed(Event Player, 100 + Global.IcingSpeedIncrease);
  • Wait(0.032, Ignore Condition);
  • Loop If Condition Is True;
  • "Don't reset speed is using Avalanche"
  • If(Event Player.IsUsingAvalanche != True);
  • Set Move Speed(Event Player, 100);
  • End;
  • }
  • }
  • rule("Slow down enemies walking on icing (if enabled)")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Global.IcingSlow > 0;
  • Is True For Any(Filtered Array(All Players(Opposite Team Of(Team Of(Event Player))), Hero Of(Current Array Element) == Hero(Mei)
  • && Count Of(Current Array Element.IcingStepPositions) > 0).IcingStepPositions, Current Array Element != 0 && Distance Between(
  • Current Array Element, Position Of(Event Player)) < Global.IcingRadius) == True;
  • }
  • actions
  • {
  • Set Move Speed(Event Player, 100 - Global.IcingSlow);
  • Wait(0.032, Ignore Condition);
  • Loop If Condition Is True;
  • Set Move Speed(Event Player, 100);
  • Start Forcing Throttle(Event Player, 0, 1, 0, 1, 0, 1);
  • }
  • }
  • rule("Subroutine - Clear Icing")
  • {
  • event
  • {
  • Subroutine;
  • ClearIcing;
  • }
  • actions
  • {
  • "Clear icing and all of it's effects"
  • While(Count Of(Event Player.IcingEffects) > 0);
  • Destroy Effect(First Of(Event Player.IcingEffects));
  • Event Player.IcingEffects = Remove From Array(Event Player.IcingEffects, First Of(Event Player.IcingEffects));
  • Destroy Effect(First Of(Event Player.IcingEffects));
  • Event Player.IcingEffects = Remove From Array(Event Player.IcingEffects, First Of(Event Player.IcingEffects));
  • Destroy Effect(First Of(Event Player.IcingEffects));
  • Event Player.IcingEffects = Remove From Array(Event Player.IcingEffects, First Of(Event Player.IcingEffects));
  • Event Player.IcingStepPositions = Remove From Array(Event Player.IcingStepPositions, First Of(Event Player.IcingStepPositions));
  • Wait(0.032, Ignore Condition);
  • End;
  • "Set to empty, just in case"
  • Event Player.IcingStepPositions = Empty Array;
  • }
  • }
  • rule("Subroutine - Chase Icing Speed")
  • rule("Subroutine - Chase Avalanche Speed")
  • {
  • event
  • {
  • Subroutine;
  • ChaseIcingSpeed;
  • }
  • actions
  • {
  • "Slowly accelerate player between a range"
  • For Player Variable(Event Player, IcingCurrentSpeed, Global.IcingMinSpeed, Global.IcingMaxSpeed, (
  • Global.IcingMaxSpeed - Global.IcingMinSpeed) / 60);
  • For Player Variable(Event Player, IcingCurrentSpeed, 200, 300, 100 / 60);
  • Set Move Speed(Event Player, Event Player.IcingCurrentSpeed);
  • Wait(0.016, Abort When False);
  • End;
  • }
  • }
  • rule("Subroutine - Freeze and damage enemies on impact")
  • {
  • event
  • {
  • Subroutine;
  • IcingFreezeAndDamageOnImpact;
  • }
  • actions
  • {
  • "Freeze players in radius if freeze duration is set"
  • If(Global.IcingFreezeOnImpact > 0);
  • Set Status(Players Within Radius(Last Of(Event Player.IcingStepPositions), Global.IcingRadius, Opposite Team Of(Team Of(
  • Event Player)), Surfaces), Event Player, Frozen, Global.IcingFreezeOnImpact);
  • End;
  • "Damage players in radius if damage is set"
  • If(Global.IcingDamageOnImpact > 0);
  • Event Player.IcingPlayersToDamage = Filtered Array(Players Within Radius(Last Of(Event Player.IcingStepPositions),
  • Global.IcingRadius, Opposite Team Of(Team Of(Event Player)), Surfaces), Array Contains(Event Player.IcingPlayersDamaged,
  • Current Array Element) != True);
  • "Damage players in this radius and remove them from the array, continue until array is empty"
  • While(Count Of(Event Player.IcingPlayersToDamage) > 0);
  • Damage(Last Of(Event Player.IcingPlayersToDamage), Event Player, Global.IcingDamageOnImpact);
  • Event Player.IcingPlayersDamaged = Append To Array(Event Player.IcingPlayersDamaged, Last Of(Event Player.IcingPlayersToDamage));
  • Event Player.IcingPlayersToDamage = Remove From Array(Event Player.IcingPlayersToDamage, Last Of(
  • Event Player.IcingPlayersToDamage));
  • End;
  • End;
  • }
  • }
  • rule("Icing HUD cooldown element")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • }
  • disabled rule("--- Bllzzard")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • }
  • rule("Initialise")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • actions
  • {
  • "Workshop setting that determines what button icing will use, opening this action might be laggy."
  • Global.BlizzardOverwritesButton = Workshop Setting Combo(Custom String("Blizzard ability"), Custom String(
  • "What button should Button overwrite?"), 0, Array(Custom String("None"), Custom String("Primary Fire"), Custom String(
  • "Secondary Fire"), Custom String("Ability 1 (Cryofreeze)"), Custom String("Ability 2 (Ice Wall)")), -1);
  • "Set the variable from the combo index to the actual button"
  • Global.BlizzardOverwritesButton = Global.OverwriteButtonArray[Global.BlizzardOverwritesButton];
  • Global.IsBlizzardAroundPlayer = Workshop Setting Toggle(Custom String("Blizzard ability"), Custom String(
  • "Position around player instead of throwable"), False, 0);
  • Global.BlizzardEnabled = Workshop Setting Toggle(Custom String("Blizzard ability"), Custom String(
  • "-- Is Blizzard enabled? (Only use Icing or Blizzard, not both)"), False);
  • Global.BlizzardOverrideCryofreeze = Workshop Setting Toggle(Custom String("Blizzard ability"), Custom String(
  • "-_ Override Cryofreeze instead of Ice Wall"), False) ? True : False;
  • Global.BlizzardFlySpeed = Workshop Setting Real(Custom String("Blizzard ability"), Custom String("Blizzard fly speed"), 0.300,
  • 0.200, 1, 0);
  • 0.200, 1);
  • Global.BlizzardGravityStrength = Workshop Setting Real(Custom String("Blizzard ability"), Custom String(
  • "Blizzard gravity strength (how quick the ball falls down)"), 2, 1, 3, 0);
  • Global.BlizzardCooldown = Workshop Setting Real(Custom String("Blizzard ability"), Custom String("Blizzard cooldown"), 10, 0, 20,
  • 0);
  • "Blizzard gravity strength (how quick the ball falls down)"), 2, 1, 3);
  • Global.BlizzardCooldown = Workshop Setting Real(Custom String("Blizzard ability"), Custom String("Blizzard cooldown"), 10, 0, 20);
  • Global.BlizzardDamagePerSecond = Workshop Setting Real(Custom String("Blizzard ability"), Custom String(
  • "Blizzard damage per second"), 55, 10, 100, 0);
  • Global.BlizzardRadius = Workshop Setting Real(Custom String("Blizzard ability"), Custom String("Blizzard radius"), 4, 1, 10, 0);
  • "Blizzard damage per second"), 55, 10, 100);
  • Global.BlizzardRadius = Workshop Setting Real(Custom String("Blizzard ability"), Custom String("Blizzard radius"), 4, 1, 10);
  • Global.BlizzardMovementSlow = Workshop Setting Integer(Custom String("Blizzard ability"), Custom String("Blizzard slow"), 35, 10,
  • 100, 0);
  • Global.BlizzardDuration = Workshop Setting Real(Custom String("Blizzard ability"), Custom String("Blizzard duration"), 4, 1, 10,
  • 0);
  • 100);
  • Global.BlizzardDuration = Workshop Setting Real(Custom String("Blizzard ability"), Custom String("Blizzard duration"), 4, 1, 10);
  • }
  • }
  • rule("Disable original Ability")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Global.BlizzardOverwritesButton != Null;
  • Hero Of(Event Player) == Hero(Mei);
  • Is Dummy Bot(Event Player) != True;
  • Global.BlizzardEnabled == True;
  • }
  • actions
  • {
  • Disallow Button(Event Player, Global.BlizzardOverwritesButton);
  • If(Global.BlizzardOverrideCryofreeze);
  • Disallow Button(Event Player, Ability 1);
  • Else;
  • Disallow Button(Event Player, Ability 2);
  • End;
  • }
  • }
  • rule("Initialise player")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Global.BlizzardOverwritesButton != Null;
  • Hero Of(Event Player) == Hero(Mei);
  • }
  • actions
  • {
  • Event Player.BlizzardIceArmor = 0;
  • }
  • }
  • rule("Ball effect")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Global.BlizzardOverwritesButton != Null;
  • Hero Of(Event Player) == Hero(Mei);
  • Global.BlizzardEnabled == True;
  • }
  • actions
  • {
  • Create Effect(Filtered Array(Event Player.BlizzardBallsFlying == True, True), Sphere, Color(Aqua),
  • Create Effect(Filtered Array(Event Player.BlizzardBallsFlying == True, True), Sphere, Aqua,
  • Event Player.BlizzardCurrentCheckPosition, 0.100, Visible To Position and Radius);
  • Create Effect(Filtered Array(Event Player.BlizzardBallsFlying == True, True), Sparkles, Color(Aqua),
  • Create Effect(Filtered Array(Event Player.BlizzardBallsFlying == True, True), Sparkles, Aqua,
  • Event Player.BlizzardCurrentCheckPosition, 0.250, Visible To Position and Radius);
  • Create Effect(Filtered Array(Event Player.BlizzardBallsFlying == True, True), Good Aura, Color(White),
  • Create Effect(Filtered Array(Event Player.BlizzardBallsFlying == True, True), Good Aura, White,
  • Event Player.BlizzardCurrentCheckPosition, 0.150, Visible To Position and Radius);
  • }
  • }
  • rule("Press ability to fire Bllzard (throwable)")
  • rule("Press ability to fire Bllzard")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Global.BlizzardOverwritesButton != Null;
  • Hero Of(Event Player) == Hero(Mei);
  • Global.IsBlizzardAroundPlayer != True;
  • Global.BlizzardEnabled == True;
  • Is Dummy Bot(Event Player) != True;
  • Is Button Held(Event Player, Global.BlizzardOverwritesButton) == True;
  • Ability Cooldown(Event Player, Global.BlizzardOverwritesButton) == 0;
  • Event Player.BlizzardActiveCooldown == 0;
  • (Global.BlizzardOverrideCryofreeze ? Is Button Held(Event Player, Ability 1) : Is Button Held(Event Player, Ability 2)) == True;
  • (Global.BlizzardOverrideCryofreeze ? Ability Cooldown(Event Player, Button(Ability 1)) == 0 : Ability Cooldown(Event Player,
  • Button(Ability 2)) == 0) == True;
  • }
  • actions
  • {
  • Set Ability Cooldown(Event Player, Global.BlizzardOverwritesButton, Global.BlizzardCooldown);
  • Event Player.BlizzardActiveCooldown = Global.BlizzardCooldown;
  • Chase Player Variable Over Time(Event Player, BlizzardActiveCooldown, 0, Global.BlizzardCooldown, Destination and Duration);
  • Play Effect(All Players(All Teams), Debuff Impact Sound, Color(White), Event Player, 50);
  • Set Ability Cooldown(Event Player, Global.BlizzardOverrideCryofreeze ? Button(Ability 1) : Button(Ability 2),
  • Global.BlizzardCooldown);
  • Play Effect(All Players(All Teams), Debuff Impact Sound, White, Event Player, 50);
  • Event Player.BlizzardActive = False;
  • Event Player.BlizzardBallsFlying = True;
  • Event Player.BlizzardFacingDirection = Facing Direction Of(Event Player);
  • Event Player.BlizzardEyeLocationWhenFired = Eye Position(Event Player);
  • Event Player.BlizzardRaycastFire = Ray Cast Hit Position(Event Player.BlizzardEyeLocationWhenFired,
  • Event Player.BlizzardEyeLocationWhenFired + (Facing Direction Of(Event Player) + Normalize(Up)) * 100, Null, All Players(
  • All Teams), False);
  • Event Player.BlizzardRaycastDistance = 100;
  • For Player Variable(Event Player, BlizzardShootLoop, 0, Event Player.BlizzardRaycastDistance, Global.BlizzardFlySpeed);
  • Event Player.BlizzardPreviousPosition = Event Player.BlizzardCurrentCheckPosition;
  • "Set current position in loop"
  • Event Player.BlizzardCurrentCheckPosition = Event Player.BlizzardEyeLocationWhenFired + Event Player.BlizzardFacingDirection * Event Player.BlizzardShootLoop;
  • "Set gravity"
  • Event Player.BlizzardCurrentCheckPosition = Event Player.BlizzardCurrentCheckPosition - Vector(0,
  • Global.BlizzardGravityStrength * -0.500 + Global.BlizzardGravityStrength ^ (Event Player.BlizzardShootLoop * 0.100), 0);
  • Wait(0.016, Ignore Condition);
  • If(X Component Of(Event Player.BlizzardPreviousPosition) != 0);
  • If(Distance Between(Event Player.BlizzardPreviousPosition, Ray Cast Hit Position(Event Player.BlizzardPreviousPosition,
  • Event Player.BlizzardCurrentCheckPosition, All Players(All Teams), Event Player, True)) < Distance Between(
  • Event Player.BlizzardPreviousPosition, Event Player.BlizzardCurrentCheckPosition));
  • Event Player.BlizzardCurrentCheckPosition = Ray Cast Hit Position(Event Player.BlizzardPreviousPosition,
  • Event Player.BlizzardCurrentCheckPosition, All Players(All Teams), Event Player, True);
  • Break;
  • End;
  • End;
  • If(Event Player.BlizzardShootLoop >= Event Player.BlizzardRaycastDistance);
  • Break;
  • End;
  • End;
  • Event Player.BlizzardBallsFlying = False;
  • Event Player.BlizzardFinalPosition = Event Player.BlizzardCurrentCheckPosition;
  • Event Player.BlizzardActive = True;
  • Event Player.BlizzardCurrentCheckPosition = Vector(0, 0, 0);
  • Play Effect(All Players(All Teams), Ring Explosion, Color(Aqua), Event Player.BlizzardFinalPosition, Global.BlizzardRadius * 2);
  • Play Effect(All Players(All Teams), Good Explosion, Color(White), Event Player.BlizzardFinalPosition, Global.BlizzardRadius);
  • Play Effect(All Players(All Teams), Bad Explosion, Color(White), Event Player.BlizzardFinalPosition, Global.BlizzardRadius);
  • Play Effect(All Players(All Teams), Explosion Sound, Color(White), Event Player.BlizzardFinalPosition, 200);
  • }
  • }
  • rule("Press ability to fire Bllzard (around player)")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Hero Of(Event Player) == Hero(Mei);
  • Global.BlizzardEnabled == True;
  • Global.IsBlizzardAroundPlayer == True;
  • Is Dummy Bot(Event Player) != True;
  • Is Button Held(Event Player, Global.BlizzardOverwritesButton) == True;
  • Ability Cooldown(Event Player, Global.BlizzardOverwritesButton) == 0;
  • Event Player.BlizzardActiveCooldown == 0;
  • }
  • actions
  • {
  • Set Ability Cooldown(Event Player, Global.BlizzardOverrideCryofreeze ? Button(Ability 1) : Button(Ability 2),
  • Global.BlizzardCooldown);
  • Play Effect(All Players(All Teams), Debuff Impact Sound, Color(White), Event Player, 50);
  • Play Effect(All Players(All Teams), Ring Explosion, Color(Aqua), Event Player, Global.BlizzardRadius * 2);
  • Play Effect(All Players(All Teams), Good Explosion, Color(White), Event Player, Global.BlizzardRadius);
  • Play Effect(All Players(All Teams), Bad Explosion, Color(White), Event Player, Global.BlizzardRadius);
  • Play Effect(All Players(All Teams), Explosion Sound, Color(White), Event Player, 200);
  • Event Player.BlizzardActive = True;
  • Play Effect(All Players(All Teams), Ring Explosion, Aqua, Event Player.BlizzardFinalPosition, Global.BlizzardRadius * 2);
  • Play Effect(All Players(All Teams), Good Explosion, White, Event Player.BlizzardFinalPosition, Global.BlizzardRadius);
  • Play Effect(All Players(All Teams), Bad Explosion, White, Event Player.BlizzardFinalPosition, Global.BlizzardRadius);
  • Play Effect(All Players(All Teams), Explosion Sound, White, Event Player.BlizzardFinalPosition, 200);
  • }
  • }
  • rule("Bllzard effect")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Global.BlizzardOverwritesButton != Null;
  • Hero Of(Event Player) == Hero(Mei);
  • Global.BlizzardEnabled == True;
  • }
  • actions
  • {
  • Create Effect(Filtered Array(Event Player.BlizzardActive == True, True), Ring, Color(Aqua),
  • Global.IsBlizzardAroundPlayer ? Event Player : Event Player.BlizzardFinalPosition, Global.BlizzardRadius,
  • Visible To Position and Radius);
  • Create Effect(Filtered Array(Event Player.BlizzardActive == True, True), Sparkles, Color(Aqua),
  • Global.IsBlizzardAroundPlayer ? Event Player : Event Player.BlizzardFinalPosition, Global.BlizzardRadius,
  • Visible To Position and Radius);
  • Create Effect(Filtered Array(Event Player.BlizzardActive == True, True), Cloud, Color(White),
  • Global.IsBlizzardAroundPlayer ? Event Player : Event Player.BlizzardFinalPosition, Global.BlizzardRadius,
  • Visible To Position and Radius);
  • Create Effect(Filtered Array(Event Player.BlizzardActive == True, True), Ring, Aqua, Event Player.BlizzardFinalPosition,
  • Global.BlizzardRadius, Visible To Position and Radius);
  • Create Effect(Filtered Array(Event Player.BlizzardActive == True, True), Sparkles, Aqua, Event Player.BlizzardFinalPosition,
  • Global.BlizzardRadius, Visible To Position and Radius);
  • Create Effect(Filtered Array(Event Player.BlizzardActive == True, True), Cloud, White, Event Player.BlizzardFinalPosition,
  • Global.BlizzardRadius, Visible To Position and Radius);
  • }
  • }
  • rule("Bllzard is active")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Event Player.BlizzardActive == True;
  • }
  • actions
  • {
  • Wait(Global.BlizzardDuration, Abort When False);
  • Play Effect(All Players(All Teams), Ring Explosion, Color(Aqua),
  • Global.IsBlizzardAroundPlayer ? Event Player : Event Player.BlizzardFinalPosition, Global.BlizzardRadius * 2);
  • Play Effect(All Players(All Teams), Good Explosion, Color(White),
  • Global.IsBlizzardAroundPlayer ? Event Player : Event Player.BlizzardFinalPosition, Global.BlizzardRadius);
  • Play Effect(All Players(All Teams), Bad Explosion, Color(White),
  • Global.IsBlizzardAroundPlayer ? Event Player : Event Player.BlizzardFinalPosition, Global.BlizzardRadius);
  • Set Status(Players Within Radius(Global.IsBlizzardAroundPlayer ? Position Of(Event Player) : Event Player.BlizzardFinalPosition,
  • Global.BlizzardRadius, Opposite Team Of(Team Of(Event Player)), Surfaces), Null, Frozen, 1.500);
  • Play Effect(All Players(All Teams), Ring Explosion, Aqua, Event Player.BlizzardFinalPosition, Global.BlizzardRadius * 2);
  • Play Effect(All Players(All Teams), Good Explosion, White, Event Player.BlizzardFinalPosition, Global.BlizzardRadius);
  • Play Effect(All Players(All Teams), Bad Explosion, White, Event Player.BlizzardFinalPosition, Global.BlizzardRadius);
  • Set Status(Players Within Radius(Event Player.BlizzardFinalPosition, Global.BlizzardRadius, Opposite Team Of(Team Of(
  • Event Player)), Surfaces), Null, Frozen, 1.500);
  • Event Player.BlizzardActive = False;
  • }
  • }
  • rule("Enemies in Bllzzard")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Event Player.BlizzardActive == True;
  • }
  • actions
  • {
  • Event Player.EnemiesInBlizzard = Players Within Radius(Global.IsBlizzardAroundPlayer ? Position Of(Event Player)
  • : Event Player.BlizzardFinalPosition, Global.BlizzardRadius, Opposite Team Of(Team Of(Event Player)), Surfaces);
  • Event Player.EnemiesInBlizzard = Players Within Radius(Event Player.BlizzardFinalPosition, Global.BlizzardRadius, Opposite Team Of(
  • Team Of(Event Player)), Surfaces);
  • Set Move Speed(Event Player.EnemiesInBlizzard, 100 - Global.BlizzardMovementSlow);
  • Damage(Event Player.EnemiesInBlizzard, Event Player, Global.BlizzardDamagePerSecond / 10);
  • Wait(0.100, Ignore Condition);
  • Set Move Speed(Event Player.EnemiesInBlizzard, 100);
  • Loop If Condition Is True;
  • }
  • }
  • rule("Mei herself is in Bllzzard")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Global.IsMeiTank == True;
  • Event Player.BlizzardActive == True;
  • Distance Between(Global.IsBlizzardAroundPlayer ? Position Of(Event Player) : Event Player.BlizzardFinalPosition, Position Of(
  • Event Player)) <= Global.BlizzardRadius;
  • Distance Between(Event Player.BlizzardFinalPosition, Position Of(Event Player)) < Global.BlizzardRadius;
  • }
  • actions
  • {
  • Skip If(Event Player.BlizzardIceArmor >= Global.MaxIceArmor, 1);
  • Event Player.BlizzardIceArmor += 30;
  • Wait(0.250, Ignore Condition);
  • Heal(Event Player, Null, 30);
  • Loop If Condition Is True;
  • }
  • }
  • rule("Ice Armor")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Global.BlizzardOverwritesButton != Null;
  • Global.BlizzardEnabled == True;
  • Event Player.BlizzardIceArmor == True;
  • }
  • actions
  • {
  • Add Health Pool To Player(Event Player, Armor, Event Player.BlizzardIceArmor, True, True);
  • }
  • }
  • disabled rule("--- Mei as a tank")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • }
  • rule("Initialise")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • actions
  • {
  • Global.IsMeiTank = Workshop Setting Toggle(Custom String("Mei as a tank"), Custom String("- Is Mei a tank?"), False, 0);
  • Global.MeiTankHealth = Workshop Setting Integer(Custom String("Mei as a tank"), Custom String("Mei max health"), 300, 200, 600, 0);
  • Global.MaxIceArmor = Workshop Setting Integer(Custom String("Mei as a tank"), Custom String("Max Ice Armor"), 300, 200, 600, 0);
  • Global.IsMeiTank = Workshop Setting Toggle(Custom String("Mei as a tank"), Custom String("- Is Mei a tank?"), False);
  • Global.MeiTankHealth = Workshop Setting Integer(Custom String("Mei as a tank"), Custom String("Mei max health"), 300, 200, 600);
  • Global.MaxIceArmor = Workshop Setting Integer(Custom String("Mei as a tank"), Custom String("Max Ice Armor"), 300, 200, 600);
  • }
  • }
  • rule("Set values")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Global.IsMeiTank == True;
  • Hero Of(Event Player) == Hero(Mei);
  • }
  • actions
  • {
  • Set Max Health(Event Player, 120);
  • }
  • }
  • disabled rule("--- Snowball secondary")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • }
  • rule("Initialise")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • actions
  • {
  • Global.SnowballEnabled = Workshop Setting Toggle(Custom String("Snowball secondary fire"), Custom String(
  • "Enable Snowball instead of regular right click"), False, -1);
  • Global.SnowballFlySpeed = Workshop Setting Real(Custom String("Snowball secondary fire"), Custom String("Snowball fly speed"),
  • 1.500, 0.100, 5, 0);
  • Global.SnowballDelay = Workshop Setting Real(Custom String("Snowball secondary fire"), Custom String(
  • "Snowball time between shots"), 0.200, 0.100, 1, 0);
  • Global.SnowballGravityStrength = 1 + Workshop Setting Integer(Custom String("Snowball secondary fire"), Custom String(
  • "Snowball gravity strength (how quick the ball falls down)"), 4, 1, 10, 0) * 0.010;
  • 0.500, 0.200, 1);
  • Global.SnowballGravityStrength = Workshop Setting Real(Custom String("Snowball secondary fire"), Custom String(
  • "Snowball gravity strength (how quick the ball falls down)"), 1.750, 1, 3);
  • Global.SnowballDamage = Workshop Setting Integer(Custom String("Snowball secondary fire"), Custom String("Snowball damage done"),
  • 50, 0, 200, 2);
  • Global.SnowballDamageAoE = Workshop Setting Integer(Custom String("Snowball secondary fire"), Custom String(
  • "Snowball AOE damage done"), 25, 0, 200, 3);
  • Global.SnowballAoERadius = Workshop Setting Real(Custom String("Snowball secondary fire"), Custom String("Snowball AoE Radius"), 1,
  • 0, 5, 4);
  • All Players(All Teams).SnowballEffects = Empty Array;
  • 50, 0, 200);
  • }
  • }
  • rule("Initialise player")
  • rule("Disable original secondary fire")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Hero Of(Event Player) == Hero(Mei);
  • Global.SnowballEnabled == True;
  • Global.IsMeiTank == True;
  • }
  • actions
  • {
  • Event Player.SnowballEffects = Empty Array;
  • Event Player.SnowballRaycastDistance = Empty Array;
  • Event Player.SnowballPreviousPosition = Empty Array;
  • Event Player.SnowballEyeLocationWhenFired = Empty Array;
  • Event Player.SnowballFinalPosition = Empty Array;
  • Event Player.SnowballShootLoop = Empty Array;
  • Disallow Button(Event Player, Secondary Fire);
  • }
  • }
  • rule("Press Secondary, Interrupt original secondary fire and replace with snowball")
  • rule("Ball effect")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Global.SnowballEnabled == True;
  • Hero Of(Event Player) == Hero(Mei);
  • Is Reloading(Event Player) != True;
  • Is Firing Secondary(Event Player) == True;
  • Global.IsMeiTank == True;
  • }
  • actions
  • {
  • Wait(0.300, Ignore Condition);
  • "Cancel full charge of secondary fire"
  • Cancel Primary Action(Event Player);
  • Set Secondary Fire Enabled(Event Player, False);
  • Disallow Button(Event Player, Button(Secondary Fire));
  • "Create a snowball"
  • Call Subroutine(AddSnowball);
  • Wait(Global.SnowballDelay, Ignore Condition);
  • Wait Until(!Is Button Held(Event Player, Button(Secondary Fire)), 2);
  • If((Global.SeparateAmmoEnabled && Event Player.CurrentAmmoSecondary > 0) || !Global.SeparateAmmoEnabled);
  • "Re-enable secondary fire"
  • Set Secondary Fire Enabled(Event Player, True);
  • End;
  • Allow Button(Event Player, Button(Secondary Fire));
  • Create Effect(Filtered Array(Event Player.SnowballBallsFlying == True, True), Sphere, White,
  • Event Player.SnowballCurrentCheckPosition, 0.100, Visible To Position and Radius);
  • Create Effect(Filtered Array(Event Player.SnowballBallsFlying == True, True), Sparkles, White,
  • Event Player.SnowballCurrentCheckPosition, 0.250, Visible To Position and Radius);
  • Create Effect(Filtered Array(Event Player.SnowballBallsFlying == True, True), Good Aura, White,
  • Event Player.SnowballCurrentCheckPosition, 0.150, Visible To Position and Radius);
  • }
  • }
  • rule("Loop through all currently active snowballs")
  • rule("Press ability to fire snowball")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Event Player.SnowballsFlying > 0;
  • Global.IsMeiTank == True;
  • Is Button Held(Event Player, Secondary Fire) == True;
  • }
  • actions
  • {
  • "Set variable to reference previous positions later"
  • Event Player.SnowballPreviousPosition = Event Player.SnowballCurrentCheckPosition;
  • "Add 1 to all \"shoot loop\" elements in array"
  • Event Player.SnowballShootLoop = Mapped Array(Event Player.SnowballShootLoop, Current Array Element + 1);
  • "Set new position for all elements in array"
  • Event Player.SnowballCurrentCheckPosition = Mapped Array(Event Player.SnowballCurrentCheckPosition,
  • Event Player.SnowballEyeLocationWhenFired[Current Array Index] + Event Player.SnowballFacingDirection[Current Array Index] * Event Player.SnowballShootLoop[Current Array Index] * Global.SnowballFlySpeed + Vector(
  • 0, Global.SnowballGravityStrength - Global.SnowballGravityStrength ^ Event Player.SnowballShootLoop[Current Array Index] - (
  • Global.SnowballGravityStrength - 1), 0));
  • "Loop over all elements in array to check if snowball hit something"
  • For Player Variable(Event Player, SnowballLoop, 0, Event Player.SnowballsFlying, 1);
  • "If distance between previous position and new position is less than expected amount it hit something"
  • If(Distance Between(Event Player.SnowballPreviousPosition[Event Player.SnowballLoop], Ray Cast Hit Position(
  • Event Player.SnowballPreviousPosition[Event Player.SnowballLoop],
  • Event Player.SnowballCurrentCheckPosition[Event Player.SnowballLoop], All Players(Opposite Team Of(Team Of(Event Player))),
  • Event Player, True)) < Distance Between(Event Player.SnowballPreviousPosition[Event Player.SnowballLoop],
  • Event Player.SnowballCurrentCheckPosition[Event Player.SnowballLoop]));
  • "Set final position to be used for damage checks"
  • Event Player.SnowballFinalPosition = Ray Cast Hit Position(Event Player.SnowballPreviousPosition[Event Player.SnowballLoop],
  • Event Player.SnowballCurrentCheckPosition[Event Player.SnowballLoop], All Players(Opposite Team Of(Team Of(Event Player))),
  • Event Player, True);
  • "Play a bunch of effects at the final location"
  • Play Effect(All Players(All Teams), Debuff Impact Sound, Color(White), Evaluate Once(
  • Event Player.SnowballCurrentCheckPosition[Event Player.SnowballLoop]), 50);
  • Play Effect(All Players(All Teams), Good Explosion, Team Of(Event Player), Evaluate Once(
  • Event Player.SnowballCurrentCheckPosition[Event Player.SnowballLoop]), Global.SnowballAoERadius);
  • Play Effect(All Players(All Teams), Good Explosion, Color(White), Evaluate Once(
  • Event Player.SnowballCurrentCheckPosition[Event Player.SnowballLoop]), Global.SnowballAoERadius * 0.950);
  • "Deal damage to players hit or near final position"
  • Call Subroutine(SnowballDamage);
  • "Remove snowball from array and destroy its effects"
  • Call Subroutine(DestroyCurrentSnowball);
  • Play Effect(All Players(All Teams), Debuff Impact Sound, White, Event Player, 50);
  • Event Player.SnowballActive = False;
  • Event Player.SnowballBallsFlying = True;
  • Event Player.SnowballFacingDirection = Facing Direction Of(Event Player);
  • Event Player.SnowballEyeLocationWhenFired = Eye Position(Event Player);
  • Event Player.SnowballRaycastFire = Ray Cast Hit Position(Event Player.SnowballEyeLocationWhenFired,
  • Event Player.SnowballEyeLocationWhenFired + (Facing Direction Of(Event Player) + Normalize(Up)) * 100, Null, All Players(
  • All Teams), False);
  • Event Player.SnowballRaycastDistance = 100;
  • For Player Variable(Event Player, SnowballShootLoop, 0, Event Player.SnowballRaycastDistance, Global.SnowballFlySpeed);
  • Event Player.SnowballPreviousPosition = Event Player.SnowballCurrentCheckPosition;
  • "Set current position in loop"
  • Event Player.SnowballCurrentCheckPosition = Event Player.SnowballEyeLocationWhenFired + Event Player.SnowballFacingDirection * Event Player.SnowballShootLoop;
  • "Set gravity"
  • Event Player.SnowballCurrentCheckPosition = Event Player.SnowballCurrentCheckPosition - Vector(0,
  • Global.SnowballGravityStrength * -0.500 + Global.SnowballGravityStrength ^ (Event Player.SnowballShootLoop * 0.100), 0);
  • Wait(0.016, Ignore Condition);
  • If(X Component Of(Event Player.SnowballPreviousPosition) != 0);
  • If(Distance Between(Event Player.SnowballPreviousPosition, Ray Cast Hit Position(Event Player.SnowballPreviousPosition,
  • Event Player.SnowballCurrentCheckPosition, All Players(All Teams), Event Player, True)) < Distance Between(
  • Event Player.SnowballPreviousPosition, Event Player.SnowballCurrentCheckPosition));
  • Event Player.SnowballCurrentCheckPosition = Ray Cast Hit Position(Event Player.SnowballPreviousPosition,
  • Event Player.SnowballCurrentCheckPosition, All Players(All Teams), Event Player, True);
  • Break;
  • End;
  • End;
  • If(Event Player.SnowballShootLoop >= Event Player.SnowballRaycastDistance);
  • Break;
  • End;
  • End;
  • Wait(0.016, Ignore Condition);
  • Loop If Condition Is True;
  • }
  • }
  • rule("Subroutine - Add snowball")
  • {
  • event
  • {
  • Subroutine;
  • AddSnowball;
  • }
  • actions
  • {
  • Event Player.SnowballsFlying += 1;
  • Call Subroutine(CreateSnowballEffects);
  • Event Player.SnowballFacingDirection[Evaluate Once(Event Player.SnowballsFlying - 1)] = Facing Direction Of(Event Player);
  • Event Player.SnowballEyeLocationWhenFired[Evaluate Once(Event Player.SnowballsFlying - 1)] = Eye Position(Event Player);
  • Event Player.SnowballRaycastFire[Evaluate Once(Event Player.SnowballsFlying - 1)] = Ray Cast Hit Position(
  • Event Player.SnowballEyeLocationWhenFired[Evaluate Once(Event Player.SnowballsFlying - 1)],
  • Event Player.SnowballEyeLocationWhenFired[Evaluate Once(Event Player.SnowballsFlying - 1)] + (Facing Direction Of(Event Player)
  • + Normalize(Up)) * 100, Null, All Players(All Teams), False);
  • Event Player.SnowballRaycastDistance[Evaluate Once(Event Player.SnowballsFlying - 1)] = 100;
  • Event Player.SnowballCurrentCheckPosition[Evaluate Once(Event Player.SnowballsFlying - 1)] = Eye Position(Event Player);
  • Event Player.SnowballShootLoop[Evaluate Once(Event Player.SnowballsFlying - 1)] = 0;
  • }
  • }
  • rule("Subroutine - Create snowball effects")
  • {
  • event
  • {
  • Subroutine;
  • CreateSnowballEffects;
  • }
  • actions
  • {
  • Create Effect(All Players(All Teams), Sphere, Color(White), Update Every Frame(
  • Event Player.SnowballCurrentCheckPosition[Evaluate Once(Event Player.SnowballsFlying - 1)]), 0.100,
  • Visible To Position and Radius);
  • Event Player.SnowballEffects = Append To Array(Event Player.SnowballEffects, Last Created Entity);
  • Create Effect(All Players(All Teams), Sparkles, Team Of(Event Player), Update Every Frame(
  • Event Player.SnowballCurrentCheckPosition[Evaluate Once(Event Player.SnowballsFlying - 1)]), 0.250,
  • Visible To Position and Radius);
  • Event Player.SnowballEffects = Append To Array(Event Player.SnowballEffects, Last Created Entity);
  • Create Effect(All Players(All Teams), Good Aura, Color(White), Update Every Frame(
  • Event Player.SnowballCurrentCheckPosition[Evaluate Once(Event Player.SnowballsFlying - 1)]), 0.150,
  • Visible To Position and Radius);
  • Event Player.SnowballEffects = Append To Array(Event Player.SnowballEffects, Last Created Entity);
  • }
  • }
  • rule("Subroutine - Destroy current snowball")
  • {
  • event
  • {
  • Subroutine;
  • DestroyCurrentSnowball;
  • }
  • actions
  • {
  • "Remove all values for current index from relevant arrays"
  • Event Player.SnowballRaycastDistance = Filtered Array(Event Player.SnowballRaycastDistance,
  • Current Array Index != Event Player.SnowballLoop);
  • Event Player.SnowballPreviousPosition = Filtered Array(Event Player.SnowballPreviousPosition,
  • Current Array Index != Event Player.SnowballLoop);
  • Event Player.SnowballCurrentCheckPosition = Filtered Array(Event Player.SnowballCurrentCheckPosition,
  • Current Array Index != Event Player.SnowballLoop);
  • Event Player.SnowballEyeLocationWhenFired = Filtered Array(Event Player.SnowballEyeLocationWhenFired,
  • Current Array Index != Event Player.SnowballLoop);
  • Event Player.SnowballFacingDirection = Filtered Array(Event Player.SnowballFacingDirection,
  • Current Array Index != Event Player.SnowballLoop);
  • Event Player.SnowballShootLoop = Filtered Array(Event Player.SnowballShootLoop, Current Array Index != Event Player.SnowballLoop);
  • Event Player.SnowballsFlying -= 1;
  • "Destroy all effects related to this snowball"
  • Destroy Effect(Last Of(Event Player.SnowballEffects));
  • Event Player.SnowballEffects = Remove From Array(Event Player.SnowballEffects, Last Of(Event Player.SnowballEffects));
  • Destroy Effect(Last Of(Event Player.SnowballEffects));
  • Event Player.SnowballEffects = Remove From Array(Event Player.SnowballEffects, Last Of(Event Player.SnowballEffects));
  • Destroy Effect(Last Of(Event Player.SnowballEffects));
  • Event Player.SnowballEffects = Remove From Array(Event Player.SnowballEffects, Last Of(Event Player.SnowballEffects));
  • }
  • }
  • rule("Subroutine - Damage players near snowball")
  • {
  • event
  • {
  • Subroutine;
  • SnowballDamage;
  • }
  • actions
  • {
  • "Check if the player closest to the final position got hit directly. We do this by ray casting from the final position to the position of the player. If the distance is less than expected they were theoretically in the radius of the snowball."
  • If(Distance Between(Event Player.SnowballFinalPosition, Ray Cast Hit Position(Event Player.SnowballFinalPosition,
  • Closest Player To(Event Player.SnowballFinalPosition, Opposite Team Of(Team Of(Event Player))), All Players(Opposite Team Of(
  • Team Of(Event Player))), Event Player, True)) <= 0.100);
  • "Damage closest player since that's very likely the one who got hit. Subtract the AoE damage since that will also be applied later."
  • Damage(Closest Player To(Event Player.SnowballFinalPosition, Opposite Team Of(Team Of(Event Player))), Event Player,
  • Global.SnowballDamage - Global.SnowballDamageAoE);
  • End;
  • "Damage all players in AoE range. We can't use Players In Radius since that use Position Of, rather than their actual hitbox."
  • Damage(Filtered Array(All Players(Opposite Team Of(Team Of(Event Player))), Distance Between(Event Player.SnowballFinalPosition,
  • Ray Cast Hit Position(Event Player.SnowballFinalPosition, Current Array Element, Current Array Element, Null, True))
  • <= Global.SnowballAoERadius), Event Player, Global.SnowballDamageAoE);
  • }
  • }
  • disabled rule("--- Weapon overcharge")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • }
  • rule("Initialise")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • actions
  • {
  • Global.IsWeaponOvercharge = Workshop Setting Toggle(Custom String("Weapon Overcharge"), Custom String(
  • "- Enable Overcharge Weapon?"), False, 0);
  • Global.OverchargeRate = Workshop Setting Real(Custom String("Weapon Overcharge"), Custom String(
  • "Charge rate (higher = faster overheat)"), 40, 1, 50, 0);
  • Global.DischargeRate = Workshop Setting Real(Custom String("Weapon Overcharge"), Custom String(
  • "Discharge rate compared to charge rate (higher = faster discharge)"), 1.500, 0.500, 5, 0);
  • Global.OverchargeDelay = Workshop Setting Real(Custom String("Weapon Overcharge"), Custom String("Delay before cooldown starts"),
  • 0.250, 0, 5, 0);
  • Global.DoesOverchargeUseAmmo = Workshop Setting Toggle(Custom String("Weapon Overcharge"), Custom String(
  • "Does Overcharge still use ammo?"), True, 0);
  • Global.OverchargeMaxAmmo = Workshop Setting Integer(Custom String("Weapon Overcharge"), Custom String(
  • "Overcharge Ammo, if using ammo"), 400, 0, 1000, 0);
  • }
  • }
  • rule("Overcharge HUD")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Hero Of(Event Player) == Hero(Mei);
  • Global.IsWeaponOvercharge == True;
  • Is Dummy Bot(Event Player) != True;
  • }
  • actions
  • {
  • Create HUD Text(Filtered Array(Event Player, Event Player.CurrentWeaponCharge < 49.999), Custom String("{0}%",
  • Event Player.CurrentWeaponCharge), Null, Null, Top, 10, Color(Green), Color(White), Color(White), Visible To and String,
  • Default Visibility);
  • Create HUD Text(Filtered Array(Event Player, Event Player.CurrentWeaponCharge > 50 && Event Player.CurrentWeaponCharge < 74.999),
  • Custom String("{0}%", Event Player.CurrentWeaponCharge), Null, Null, Top, 10, Color(Yellow), Color(White), Color(White),
  • Visible To and String, Default Visibility);
  • Create HUD Text(Filtered Array(Event Player, Event Player.CurrentWeaponCharge > 75 && Event Player.CurrentWeaponCharge < 89.999),
  • Custom String("{0}%", Event Player.CurrentWeaponCharge), Null, Null, Top, 10, Color(Orange), Color(White), Color(White),
  • Visible To and String, Default Visibility);
  • Create HUD Text(Filtered Array(Event Player, Event Player.CurrentWeaponCharge >= 90), Custom String("{0}%",
  • Event Player.CurrentWeaponCharge), Null, Null, Top, 10, Color(Red), Color(White), Color(White), Visible To and String,
  • Default Visibility);
  • Create HUD Text(Event Player, Null, Custom String(" "), Custom String(" "), Top, 5, Color(White), Color(White), Color(White),
  • Visible To and String, Default Visibility);
  • Create HUD Text(Event Player, Null, Custom String(" "), Custom String(" "), Top, 5, Color(White), Color(White), Color(White),
  • Visible To and String, Default Visibility);
  • Create HUD Text(Event Player, Null, Custom String(" "), Custom String(" "), Top, 5, Color(White), Color(White), Color(White),
  • Visible To and String, Default Visibility);
  • Create HUD Text(Event Player, Null, Custom String(" "), Custom String(" "), Top, 5, Color(White), Color(White), Color(White),
  • Visible To and String, Default Visibility);
  • Create HUD Text(Event Player, Null, Custom String(" "), Custom String(" "), Top, 5, Color(White), Color(White), Color(White),
  • Visible To and String, Default Visibility);
  • Create HUD Text(Event Player, Null, Custom String(" "), Custom String(" "), Top, 5, Color(White), Color(White), Color(White),
  • Visible To and String, Default Visibility);
  • Create HUD Text(Event Player, Null, Custom String(" "), Custom String(" "), Top, 5, Color(White), Color(White), Color(White),
  • Visible To and String, Default Visibility);
  • Create HUD Text(Event Player, Null, Custom String(" "), Custom String(" "), Top, 5, Color(White), Color(White), Color(White),
  • Visible To and String, Default Visibility);
  • Create HUD Text(Event Player, Null, Custom String(" "), Custom String(" "), Top, 5, Color(White), Color(White), Color(White),
  • Visible To and String, Default Visibility);
  • Create HUD Text(Event Player, Null, Custom String(" "), Custom String(" "), Top, 5, Color(White), Color(White), Color(White),
  • Visible To and String, Default Visibility);
  • Create HUD Text(Event Player, Null, Custom String(" "), Custom String(" "), Top, 5, Color(White), Color(White), Color(White),
  • Visible To and String, Default Visibility);
  • Create HUD Text(Event Player, Null, Custom String(" "), Custom String(" "), Top, 5, Color(White), Color(White), Color(White),
  • Visible To and String, Default Visibility);
  • Create HUD Text(Event Player, Null, Custom String(" "), Custom String(" "), Top, 5, Color(White), Color(White), Color(White),
  • Visible To and String, Default Visibility);
  • }
  • }
  • rule("Set weapon ammo")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Hero Of(Event Player) == Hero(Mei);
  • Global.IsWeaponOvercharge == True;
  • Has Spawned(Event Player) == True;
  • Is Alive(Event Player) == True;
  • }
  • actions
  • {
  • Set Max Ammo(Event Player, 0, Global.DoesOverchargeUseAmmo ? Global.OverchargeMaxAmmo : 200);
  • Set Ammo(Event Player, 0, Global.DoesOverchargeUseAmmo ? Global.OverchargeMaxAmmo : 200);
  • }
  • }
  • rule("Is primary held? Charge weapon")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Hero Of(Event Player) == Hero(Mei);
  • Global.IsWeaponOvercharge == True;
  • Is Firing Primary(Event Player) == True;
  • Event Player.WeaponIsOverheated != True;
  • }
  • actions
  • {
  • Stop Chasing Player Variable(Event Player, CurrentWeaponCharge);
  • Chase Player Variable At Rate(Event Player, CurrentWeaponCharge, 100, Global.OverchargeRate, Destination and Rate);
  • }
  • }
  • rule("Is primary NOT held? Stop charging weapon and discharge")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Hero Of(Event Player) == Hero(Mei);
  • Global.IsWeaponOvercharge == True;
  • Is Firing Primary(Event Player) != True;
  • Is Button Held(Event Player, Button(Secondary Fire)) != True;
  • Event Player.WeaponIsOverheated != True;
  • }
  • actions
  • {
  • Stop Chasing Player Variable(Event Player, CurrentWeaponCharge);
  • Wait(Global.OverchargeDelay, Abort When False);
  • If(!Global.DoesOverchargeUseAmmo);
  • Set Ammo(Event Player, 0, Global.OverchargeMaxAmmo);
  • End;
  • Chase Player Variable At Rate(Event Player, CurrentWeaponCharge, 0, Global.OverchargeRate * Global.DischargeRate,
  • Destination and Rate);
  • }
  • }
  • rule("Is primary NOT held, but secondary is?")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Hero Of(Event Player) == Hero(Mei);
  • Global.IsWeaponOvercharge == True;
  • Is Firing Primary(Event Player) != True;
  • Is Button Held(Event Player, Button(Secondary Fire)) == True;
  • Event Player.WeaponIsOverheated != True;
  • }
  • actions
  • {
  • Stop Chasing Player Variable(Event Player, CurrentWeaponCharge);
  • }
  • }
  • rule("Using secondary fire")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Hero Of(Event Player) == Hero(Mei);
  • Global.IsWeaponOvercharge == True;
  • Event Player.CurrentWeaponCharge < 100;
  • Is Firing Secondary(Event Player) == True;
  • Event Player.WeaponIsOverheated != True;
  • }
  • actions
  • {
  • Set Damage Dealt(Event Player, 120 - 40 * (Event Player.CurrentWeaponCharge / 100));
  • Wait(0.016, Ignore Condition);
  • Event Player.CurrentWeaponCharge = 100;
  • Wait(1, Ignore Condition);
  • Set Damage Dealt(Event Player, 100);
  • }
  • }
  • rule("Is reloading?")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Hero Of(Event Player) == Hero(Mei);
  • Global.IsWeaponOvercharge == True;
  • Is Reloading(Event Player) == True;
  • }
  • actions
  • {
  • Chase Player Variable At Rate(Event Player, CurrentWeaponCharge, 0, 100, Destination and Rate);
  • }
  • }
  • rule("Is fully charged?")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Global.IsWeaponOvercharge == True;
  • Event Player.CurrentWeaponCharge == 100;
  • }
  • actions
  • {
  • Set Status(Event Player, Null, Burning, 10);
  • Event Player.WeaponIsOverheated = True;
  • Set Primary Fire Enabled(Event Player, False);
  • If(!Global.DoesOverchargeUseAmmo);
  • Wait(0.600, Ignore Condition);
  • Press Button(Event Player, Button(Reload));
  • Set Primary Fire Enabled(Event Player, True);
  • End;
  • }
  • }
  • rule("Is overheated?")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Event Player.WeaponIsOverheated == True;
  • }
  • actions
  • {
  • Set Primary Fire Enabled(Event Player, False);
  • Disallow Button(Event Player, Button(Secondary Fire));
  • Wait(0.500, Ignore Condition);
  • Allow Button(Event Player, Button(Secondary Fire));
  • Set Secondary Fire Enabled(Event Player, False);
  • Wait(0.500, Ignore Condition);
  • Chase Player Variable At Rate(Event Player, CurrentWeaponCharge, 0, Global.OverchargeRate * Global.DischargeRate,
  • Destination and Rate);
  • Wait(100 / (Global.OverchargeRate * Global.DischargeRate), Ignore Condition);
  • Set Primary Fire Enabled(Event Player, True);
  • Set Secondary Fire Enabled(Event Player, True);
  • Clear Status(Event Player, Burning);
  • Event Player.WeaponIsOverheated = False;
  • }
  • }
  • rule("Damage numbers")
  • {
  • event
  • {
  • Player Dealt Damage;
  • All;
  • All;
  • }
  • conditions
  • {
  • Event Damage > 20;
  • Global.IsWeaponOvercharge == True;
  • }
  • actions
  • {
  • Small Message(All Players(All Teams), Custom String("Damage dealt: {0}", Event Damage));
  • }
  • }
  • disabled rule("--- Separate weapon ammo for primary and secondary")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • }
  • rule("Initialise")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • actions
  • {
  • Global.SeparateAmmoEnabled = Workshop Setting Toggle(Custom String("Separate ammo counter"), Custom String(
  • "Use seperate ammo pool for Primary and Secondary fire"), False, 0);
  • Global.MaxAmmoPrimary = Workshop Setting Integer(Custom String("Separate ammo counter"), Custom String("Primary Fire Max Ammo"),
  • 50, 30, 100, 1);
  • Global.MaxAmmoSecondary = Workshop Setting Integer(Custom String("Separate ammo counter"), Custom String(
  • "Secondary Fire Max Ammo"), 100, 10, 200, 2);
  • Global.SeparateAmmoAutoReload = Workshop Setting Toggle(Custom String("Separate ammo counter"), Custom String(
  • "Auto reload when either primary or secondary is empty"), False, 3);
  • }
  • }
  • rule("HUD")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Global.SeparateAmmoEnabled == True;
  • }
  • actions
  • {
  • disabled Create HUD Text(Filtered Array(Local Player, Hero Of(Local Player) == Hero(Mei) && True), Null, Custom String(
  • " \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"), Custom String(" \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"), Right, 99, Null, Color(
  • White), Color(White), Visible To String and Color, Default Visibility);
  • Create HUD Text(Filtered Array(Local Player, Hero Of(Local Player) == Hero(Mei) && True), Null, Custom String(
  • " \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"), Custom String(" \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"), Right, 99, Null, Color(
  • White), Color(White), Visible To String and Color, Default Visibility);
  • Create HUD Text(Filtered Array(All Players(All Teams), Hero Of(Local Player) == Hero(Mei)), Custom String("{0} {2} {1}",
  • Custom String("{0}/{1}", Local Player.CurrentAmmoPrimary, Global.MaxAmmoPrimary), Custom String("{0}/{1}", Round To Integer(
  • Local Player.CurrentAmmoSecondary, Up), Global.MaxAmmoSecondary), Ability Icon String(Hero(Mei), Button(Primary Fire))), Null,
  • Null, Right, 100, Color(White), Color(White), Color(White), Visible To and String, Visible Never);
  • }
  • }
  • rule("Set max ammo")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • Mei;
  • }
  • conditions
  • {
  • Global.SeparateAmmoEnabled == True;
  • }
  • actions
  • {
  • Set Max Ammo(Event Player, 0, 999);
  • Set Ammo(Event Player, 0, 999);
  • Event Player.CurrentAmmoPrimary = Global.MaxAmmoPrimary;
  • Event Player.CurrentAmmoSecondary = Global.MaxAmmoSecondary;
  • }
  • }
  • rule("Is firing secondary - Subtract ammo with chase")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • Mei;
  • }
  • conditions
  • {
  • Global.SeparateAmmoEnabled == True;
  • Is Firing Secondary(Event Player) == True;
  • }
  • actions
  • {
  • disabled Event Player.CurrentAmmoSecondary -= 10;
  • Chase Player Variable Over Time(Event Player, CurrentAmmoSecondary, Event Player.CurrentAmmoSecondary - 10, 0.200, None);
  • }
  • }
  • rule("Secondary is empty - Disable secondary until it's no longer empty")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Global.SeparateAmmoEnabled == True;
  • Event Player.CurrentAmmoSecondary == 0;
  • }
  • actions
  • {
  • Wait(0.250, Abort When False);
  • Set Secondary Fire Enabled(Event Player, False);
  • "Automatically reload if enabled in Workshop Settings"
  • If(Global.SeparateAmmoAutoReload);
  • Press Button(Event Player, Button(Reload));
  • End;
  • "Wait until ammo is no longer empty"
  • Wait Until(Event Player.CurrentAmmoSecondary > 0, 99999);
  • Set Secondary Fire Enabled(Event Player, True);
  • }
  • }
  • rule("Is firing primary - Subtract ammo")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Global.SeparateAmmoEnabled == True;
  • Is Firing Primary(Event Player) == True;
  • }
  • actions
  • {
  • Event Player.CurrentAmmoPrimary -= 1;
  • Wait(0.048, Abort When False);
  • Loop If Condition Is True;
  • }
  • }
  • rule("Primary is empty - Disable secondary until it's no longer empty")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Global.SeparateAmmoEnabled == True;
  • Event Player.CurrentAmmoPrimary == 0;
  • }
  • actions
  • {
  • Set Primary Fire Enabled(Event Player, False);
  • "Automatically reload if enabled in Workshop Settings"
  • If(Global.SeparateAmmoAutoReload);
  • Press Button(Event Player, Button(Reload));
  • End;
  • "Wait until primary is no longer empty"
  • Wait Until(Event Player.CurrentAmmoPrimary > 0, 99999);
  • Set Primary Fire Enabled(Event Player, True);
  • }
  • }
  • rule("Both Primary and Secondary are empty - Reload")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • Mei;
  • }
  • conditions
  • {
  • Global.SeparateAmmoEnabled == True;
  • Event Player.CurrentAmmoPrimary == 0;
  • Event Player.CurrentAmmoSecondary == 0;
  • }
  • actions
  • {
  • Press Button(Event Player, Button(Reload));
  • }
  • }
  • rule("Is reloading")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • Mei;
  • }
  • conditions
  • {
  • Global.SeparateAmmoEnabled == True;
  • Is Reloading(Event Player) == True;
  • }
  • actions
  • {
  • Wait(0.750, Ignore Condition);
  • Stop Chasing Player Variable(Event Player, CurrentAmmoSecondary);
  • Set Ammo(Event Player, 0, 999);
  • Event Player.CurrentAmmoPrimary = Global.MaxAmmoPrimary;
  • Event Player.CurrentAmmoSecondary = Global.MaxAmmoSecondary;
  • }
  • }
  • rule("Trying to fire when either is empty")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • "If firing primary with 0 ammo, or if firing secondary with 0 ammo"
  • ((Is Button Held(Event Player, Button(Primary Fire)) && !Event Player.CurrentAmmoPrimary) || (Is Button Held(Event Player, Button(
  • Secondary Fire)) && !Event Player.CurrentAmmoSecondary)) == True;
  • Global.SeparateAmmoAutoReload != True;
  • }
  • actions
  • {
  • Play Effect(Event Player, Debuff Impact Sound, Color(White), Event Player, 25);
  • Event Player.SnowballBallsFlying = False;
  • Event Player.SnowballFinalPosition = Event Player.SnowballCurrentCheckPosition;
  • Event Player.SnowballActive = True;
  • Event Player.SnowballCurrentCheckPosition = Vector(0, 0, 0);
  • Play Effect(All Players(All Teams), Debuff Impact Sound, White, Event Player.SnowballFinalPosition, 1200);
  • Play Effect(All Players(All Teams), Good Explosion, White, Event Player.SnowballFinalPosition, 0.500);
  • Damage(First Of(Players Within Radius(Event Player.SnowballFinalPosition, 2, All Teams, Surfaces And Enemy Barriers)),
  • Event Player, Global.SnowballDamage);
  • }
  • }
Join the Workshop.codes Discord