Return to post
- settings
- {
- main
- {
Description: "Mei rework using HOTS abilities. Made by Mitsiee. More info at workshop.codes/mei-hots."
- Description: "Mei rework using HOTS abilities, and more. Made by Mitsiee. More info at workshop.codes/mei-hots."
- }
- modes
- {
- Assault
- {
Limit Roles: 2 Of Each Role Per Team
- enabled maps
- {
- }
- }
- Control
- {
Limit Roles: 2 Of Each Role Per Team
- enabled maps
- {
- }
- }
- Deathmatch
- {
- enabled maps
- {
- }
- }
- Escort
- {
Limit Roles: 2 Of Each Role Per Team
- enabled maps
- {
- }
- }
- Hybrid
- {
Limit Roles: 2 Of Each Role Per Team
- 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
- }
- }
- }
- }
- 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
- 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: SnowballBallsFlying
- 32: SnowballActive
- 33: SnowballRaycastDistance
- 34: SnowballPreviousPosition
- 35: SnowballFacingDirection
- 36: SnowballEyeLocationWhenFired
- 37: SnowballFinalPosition
- 38: CurrentWeaponCharge
- 39: WeaponIsOverheated
- }
- subroutines
- {
- 0: SetAvalancheCamera
- 1: ChaseAvalancheSpeed
- 2: ChaseAvalancheRadius
- 3: ClearAvalanche
- 4: ExplodeAvalanche
- 5: ExplodePlayersInAvalanche
- 6: ClearIcing
- 7: ChaseIcingSpeed
- }
- rule("Spawn bots - For debugging")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
Is Button Held(Event Player, Crouch) == True;
Is Button Held(Event Player, Interact) == True;
- Is Button Held(Event Player, Button(Crouch)) == True;
- Is Button Held(Event Player, Button(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), Interact);
- Press Button(Filtered Array(All Players(All Teams), Current Array Element != Event Player), Button(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,
White, Aqua, White, Visible To and String, Default Visibility);
- Color(White), Color(Aqua), Color(White), Visible To and String, Default Visibility);
- }
- }
- disabled rule("--- Avalanche")
- {
- event
- {
- Ongoing - Global;
- }
- }
- rule("Disable original Ultimate")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
- Hero Of(Event Player) == Hero(Mei);
- }
- actions
- {
Disallow Button(Event Player, Ultimate);
- Disallow Button(Event Player, Button(Ultimate));
- }
- }
- rule("Initialise Avalanche")
- {
- event
- {
- Ongoing - Global;
- }
- actions
- {
Global.AvalancheRadius = 2;
Global.AvalancheDuration = 3;
- Global.AvalancheRadius = Workshop Setting Real(Custom String("Avalanche ability (Ultimate)"), Custom String("Avalanche Radius"), 2,
- 1, 3, 0);
- Global.AvalancheDuration = Workshop Setting Real(Custom String("Avalanche ability (Ultimate)"), Custom String(
- "Avalanche Duration"), 3, 1, 5, 0);
- Global.AvalancheMaxSpeed = Workshop Setting Integer(Custom String("Avalanche ability (Ultimate)"), Custom String(
- "Avalanche max speed"), 200, 100, 400, 0);
- }
- }
- rule("Player presses Ultimate")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
- Hero Of(Event Player) == Hero(Mei);
- Ultimate Charge Percent(Event Player) == 100;
Is Button Held(Event Player, Ultimate) == True;
- Is Button Held(Event Player, Button(Ultimate)) == True;
- Event Player.IsUsingAvalanche != True;
- }
- actions
- {
- Event Player.IsUsingAvalanche = True;
- 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
- {
- Event Player.AvalancheFacingDirection = Facing Direction Of(Event Player);
- Event Player.PlayersInAvalanche = Empty Array;
- Set Status(Event Player, Null, Phased Out, Global.AvalancheDuration);
- Start Rule(ChaseAvalancheSpeed, Do Nothing);
- Start Rule(ChaseAvalancheRadius, Do Nothing);
- Call Subroutine(SetAvalancheCamera);
- Start Forcing Throttle(Event Player, 1, 1, 0, 0, 0, 0);
- "Effects"
- Event Player.AvalancheEffects = Empty Array;
Create Effect(All Players(All Teams), Sphere, White, Event Player, Event Player.AvalancheCurrentRadius,
- Create Effect(All Players(All Teams), Sphere, Color(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, Aqua, Event Player, Event Player.AvalancheCurrentRadius,
- Create Effect(All Players(All Teams), Sphere, Color(Aqua), 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), Sparkles, White, Position Of(Event Player), Event Player.AvalancheCurrentRadius * 2,
Visible To Position and Radius);
- 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);
- Event Player.AvalancheEffects = Append To Array(Event Player.AvalancheEffects, Last Created Entity);
Create Effect(All Players(All Teams), Sparkles, Aqua, Position Of(Event Player), Event Player.AvalancheCurrentRadius * 2,
Visible To Position and Radius);
- Create Effect(All Players(All Teams), Sparkles, Color(Aqua), Update Every Frame(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, White, Position Of(Event Player), Event Player.AvalancheCurrentRadius * 2,
Visible To Position and Radius);
- 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);
- Event Player.AvalancheEffects = Append To Array(Event Player.AvalancheEffects, Last Created Entity);
Create Effect(All Players(All Teams), Cloud, Aqua, Position Of(Event Player), Event Player.AvalancheCurrentRadius * 2,
Visible To Position and Radius);
- Create Effect(All Players(All Teams), Cloud, Color(Aqua), Update Every Frame(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(Global.AvalancheDuration, Abort When False);
- Call Subroutine(ClearAvalanche);
- }
- }
- rule("Subroutine - Set Avalanche camera")
- {
- event
- {
- Subroutine;
- SetAvalancheCamera;
- }
- actions
- {
- 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
- {
For Player Variable(Event Player, AvalancheSpeed, 100, 200, 100 / 60);
- 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 = 1;
- Chase Player Variable Over Time(Event Player, AvalancheCurrentRadius, Global.AvalancheRadius, 1.500, Destination and Duration);
- }
- }
- rule("Subroutine - Clear Avalanche")
- {
- event
- {
- Subroutine;
- ClearAvalanche;
- }
- actions
- {
- 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 Status(Event Player, Invincible);
- Clear Status(Event Player, Rooted);
- Stop Camera(Event Player);
- }
- }
- rule("Subroutine - Explode Avalanche")
- {
- event
- {
- Subroutine;
- ExplodeAvalanche;
- }
- actions
- {
- Start Rule(ExplodePlayersInAvalanche, Do Nothing);
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);
- 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);
- Wait(0.050, Ignore Condition);
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);
- Play Effect(All Players(All Teams), Good Explosion, Color(Aqua), Event Player.AvalancheFinalPosition + Up,
- Global.AvalancheRadius * 2);
- Play Effect(All Players(All Teams), Ring Explosion, Color(Aqua), Event Player.AvalancheFinalPosition, Global.AvalancheRadius * 4);
- Wait(0.150, Ignore Condition);
Play Effect(All Players(All Teams), Ring Explosion, White, Event Player.AvalancheFinalPosition, Global.AvalancheRadius * 4);
- Play Effect(All Players(All Teams), Ring Explosion, Color(White), Event Player.AvalancheFinalPosition, Global.AvalancheRadius * 4);
- Wait(0.050, Ignore Condition);
Play Effect(All Players(All Teams), Ring Explosion, Aqua, Event Player.AvalancheFinalPosition, Global.AvalancheRadius * 4);
- Play Effect(All Players(All Teams), Ring Explosion, Color(Aqua), Event Player.AvalancheFinalPosition, Global.AvalancheRadius * 4);
- Wait(0.150, Ignore Condition);
Play Effect(All Players(All Teams), Ring Explosion, White, Event Player.AvalancheFinalPosition, Global.AvalancheRadius * 4);
- Play Effect(All Players(All Teams), Ring Explosion, Color(White), Event Player.AvalancheFinalPosition, Global.AvalancheRadius * 4);
- Wait(0.050, Ignore Condition);
Play Effect(All Players(All Teams), Ring Explosion, Aqua, Event Player.AvalancheFinalPosition, Global.AvalancheRadius * 4);
- Play Effect(All Players(All Teams), Ring Explosion, Color(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 Effect(All Players(All Teams), Explosion Sound, White, Event Player, 100);
- Play Effect(All Players(All Teams), Explosion Sound, Color(White), Event Player, 100);
- Communicate(Event Player, Sorry);
- "Detach players"
- While(Count Of(Event Player.PlayersInAvalanche) > 0);
- Detach Players(First Of(Event Player.PlayersInAvalanche));
- Teleport(First Of(Event Player.PlayersInAvalanche), Nearest Walkable Position(Position Of(First Of(
- Event Player.PlayersInAvalanche))));
- Wait(0.016, Ignore Condition);
- 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 Status(First Of(Event Player.PlayersInAvalanche), Frozen);
- Wait(0.016, Ignore Condition);
- 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;
- }
- }
- rule("Avalanche is active, set facing direction")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
- Event Player.IsUsingAvalanche == True;
- }
- actions
- {
- 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 Effect(All Players(All Teams), Debuff Impact Sound, White, Event Player, 50);
- Play Effect(All Players(All Teams), Debuff Impact Sound, Color(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
- {
- Count Of(Filtered Array(All Players(Opposite Team Of(Team Of(Event Player))), Current Array Element.IsUsingAvalanche == True)) > 0;
- 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, 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
- {
Global.IcingMaxRange = 20;
Global.IcingSteps = 20;
Global.IcingRadius = 1.500;
Global.IcingDuration = 8;
- Global.IcingEnabled = Workshop Setting Toggle(Custom String("Icing ability"), Custom String(
- "-- Is Icing enabled? (Only use Icing or Blizzard, not both)"), True, 0);
- Global.IcingAbilityOverrideCryofreeze = Workshop Setting Toggle(Custom String("Icing ability"), Custom String(
- "- Override Cryofreeze instead of Ice Wall"), False, 0) ? True : False;
- Global.IcingMaxRange = Workshop Setting Real(Custom String("Icing ability"), Custom String("Icing max range"), 20, 5, 100, 0);
- Global.IcingSteps = Workshop Setting Integer(Custom String("Icing ability"), Custom String(
- "Steps (Higher = more circles on the ground)"), 20, 5, 50, 0);
- Global.IcingRadius = Workshop Setting Real(Custom String("Icing ability"), Custom String("Icing radius (width)"), 1.500, 0.500, 5,
- 0);
- Global.IcingDuration = Workshop Setting Real(Custom String("Icing ability"), Custom String("Icing Duration"), 8, 0, 100, 0);
- Global.IcingCooldown = Workshop Setting Real(Custom String("Icing ability"), Custom String("Icing Cooldown"), 10, 0, 100, 0);
- }
- }
rule("Disable original E")
- rule("Disable original Ability")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
- Hero Of(Event Player) == Hero(Mei);
- Global.IcingEnabled == True;
- }
- actions
- {
Disallow Button(Event Player, Ability 2);
- If(Global.IcingAbilityOverrideCryofreeze);
- Disallow Button(Event Player, Button(Ability 1));
- Else;
- Disallow Button(Event Player, Button(Ability 2));
- End;
- }
- }
rule("Presses E")
- rule("Presses Ability")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
Is Button Held(Event Player, Ability 2) == True;
Ability Cooldown(Event Player, Button(Ability 2)) == 0;
- Hero Of(Event Player) == Hero(Mei);
- Global.IcingEnabled == True;
- (Global.IcingAbilityOverrideCryofreeze ? Is Button Held(Event Player, Button(Ability 1)) : Is Button Held(Event Player, Button(
- Ability 2))) == True;
- (Global.IcingAbilityOverrideCryofreeze ? Ability Cooldown(Event Player, Button(Ability 1)) == 0 : Ability Cooldown(Event Player,
- Button(Ability 2)) == 0) == True;
- }
- actions
- {
Set Ability Cooldown(Event Player, Button(Ability 2), Global.IcingDuration + 1);
- Set Ability Cooldown(Event Player, Global.IcingAbilityOverrideCryofreeze ? Button(Ability 1) : Button(Ability 2),
- Global.IcingCooldown);
- Communicate(Event Player, Going In);
- Event Player.IcingEffects = Empty Array;
- Event Player.IcingStepPositions = Empty Array;
- 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), Good Aura, Sky Blue, Last Of(Event Player.IcingStepPositions) + Up * 3, 0.250,
- Create Effect(All Players(All Teams), Good Aura, Color(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, White, Event Player, 100);
- Play Effect(All Players(All Teams), Buff Impact Sound, Color(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);
- Event Player.IcingStepPositions = Append To Array(Event Player.IcingStepPositions,
- Event Player.IcingStartPosition + Direction Towards(Event Player.IcingStartPosition, Event Player.IcingEndPosition)
- * Event Player.IcingCreateStep);
- 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);
Create Effect(All Players(All Teams), Ring, Aqua, Last Of(Event Player.IcingStepPositions), Global.IcingRadius, None);
- Create Effect(All Players(All Teams), Ring, Color(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, White, Last Of(Event Player.IcingStepPositions) + Down * 0.250, Global.IcingRadius,
None);
- Create Effect(All Players(All Teams), Cloud, Color(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, Aqua, Last Of(Event Player.IcingStepPositions) + Down * 0.250, Global.IcingRadius,
None);
- Create Effect(All Players(All Teams), Sparkles, Color(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, 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);
- Play Effect(All Players(All Teams), Ring Explosion, Color(Aqua), 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, Color(Aqua), 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);
- Wait(0.032, Ignore Condition);
- End;
- Destroy Effect(Event Player.IcingSnowballEffect);
- Wait(Global.IcingDuration, Ignore Condition);
- Call Subroutine(ClearIcing);
- }
- }
- rule("Player is on Icing")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
- 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;
- }
- actions
- {
- 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;
- 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")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
- 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);
- 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
- {
- 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;
- }
- }
- rule("Subroutine - Chase Avalanche Speed")
- {
- event
- {
- Subroutine;
- ChaseIcingSpeed;
- }
- actions
- {
- 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;
- }
- }
- disabled rule("--- Bllzzard")
- {
- event
- {
- Ongoing - Global;
- }
- }
- rule("Initialise")
- {
- event
- {
- Ongoing - Global;
- }
- actions
- {
- Global.BlizzardEnabled = Workshop Setting Toggle(Custom String("Blizzard ability"), Custom String(
- "-- Is Blizzard enabled? (Only use Icing or Blizzard, not both)"), False, 0);
- Global.BlizzardOverrideCryofreeze = Workshop Setting Toggle(Custom String("Blizzard ability"), Custom String(
- "-_ Override Cryofreeze instead of Ice Wall"), False, 0) ? True : False;
- Global.IsBlizzardAroundPlayer = Workshop Setting Toggle(Custom String("Blizzard ability"), Custom String(
- "~ Position around player instead of throwable"), False, 0);
- Global.BlizzardFlySpeed = Workshop Setting Real(Custom String("Blizzard ability"), Custom String("Blizzard fly speed"), 0.300,
- 0.200, 1, 0);
- 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);
- 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);
- 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);
- }
- }
- rule("Disable original Ability")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
- Hero Of(Event Player) == Hero(Mei);
- Is Dummy Bot(Event Player) != True;
- Global.BlizzardEnabled == True;
- }
- actions
- {
- If(Global.BlizzardOverrideCryofreeze);
- Disallow Button(Event Player, Button(Ability 1));
- Else;
- Disallow Button(Event Player, Button(Ability 2));
- End;
- }
- }
- rule("Initialise player")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
- Hero Of(Event Player) == Hero(Mei);
- }
- actions
- {
- Event Player.BlizzardIceArmor = 0;
- }
- }
- rule("Ball effect")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
- Global.BlizzardEnabled == True;
- Hero Of(Event Player) == Hero(Mei);
- }
- actions
- {
- Create Effect(Filtered Array(Event Player.BlizzardBallsFlying == True, True), Sphere, Color(Aqua),
- Event Player.BlizzardCurrentCheckPosition, 0.100, Visible To Position and Radius);
- Create Effect(Filtered Array(Event Player.BlizzardBallsFlying == True, True), Sparkles, Color(Aqua),
- Event Player.BlizzardCurrentCheckPosition, 0.250, Visible To Position and Radius);
- Create Effect(Filtered Array(Event Player.BlizzardBallsFlying == True, True), Good Aura, Color(White),
- Event Player.BlizzardCurrentCheckPosition, 0.150, Visible To Position and Radius);
- }
- }
- rule("Press ability to fire Bllzard (throwable)")
- {
- 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;
- (Global.BlizzardOverrideCryofreeze ? Is Button Held(Event Player, Button(Ability 1)) : Is Button Held(Event Player, Button(
- 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.BlizzardOverrideCryofreeze ? Button(Ability 1) : Button(Ability 2),
- Global.BlizzardCooldown);
- Play Effect(All Players(All Teams), Debuff Impact Sound, Color(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;
- (Global.BlizzardOverrideCryofreeze ? Is Button Held(Event Player, Button(Ability 1)) : Is Button Held(Event Player, Button(
- 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.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;
- }
- }
- rule("Bllzard effect")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
- 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);
- }
- }
- 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);
- 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);
- 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;
- }
- 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.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);
- }
- }
- 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.SnowballFlySpeed = Workshop Setting Real(Custom String("Snowball secondary fire"), Custom String("Snowball fly speed"),
- 0.500, 0.200, 1, 0);
- 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, 0);
- Global.SnowballDamage = Workshop Setting Integer(Custom String("Snowball secondary fire"), Custom String("Snowball damage done"),
- 50, 0, 200, 0);
- }
- }
- rule("Disable original secondary fire")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
- Hero Of(Event Player) == Hero(Mei);
- Global.IsMeiTank == True;
- Global.IsWeaponOvercharge != True;
- }
- actions
- {
- Disallow Button(Event Player, Button(Secondary Fire));
- }
- }
- rule("Ball effect")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
- Hero Of(Event Player) == Hero(Mei);
- Global.IsMeiTank == True;
- Global.IsWeaponOvercharge != True;
- }
- actions
- {
- Create Effect(Filtered Array(Event Player.SnowballBallsFlying == True, True), Sphere, Color(White),
- Event Player.SnowballCurrentCheckPosition, 0.100, Visible To Position and Radius);
- Create Effect(Filtered Array(Event Player.SnowballBallsFlying == True, True), Sparkles, Color(White),
- Event Player.SnowballCurrentCheckPosition, 0.250, Visible To Position and Radius);
- Create Effect(Filtered Array(Event Player.SnowballBallsFlying == True, True), Good Aura, Color(White),
- Event Player.SnowballCurrentCheckPosition, 0.150, Visible To Position and Radius);
- }
- }
- rule("Press ability to fire snowball")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
- Hero Of(Event Player) == Hero(Mei);
- Global.IsMeiTank == True;
- Global.IsWeaponOvercharge != True;
- Is Button Held(Event Player, Button(Secondary Fire)) == True;
- }
- actions
- {
- Play Effect(All Players(All Teams), Debuff Impact Sound, Color(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;
- 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, Color(White), Event Player.SnowballFinalPosition, 1200);
- Play Effect(All Players(All Teams), Good Explosion, Color(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);
- }
- }
- 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));
- }
- }