Create
Return to post

Comparing difference between and

View raw
  • settings
  • {
  • main
  • {
  • Description: "Play through 3 time loops of yourself, a clone will replay your actions in previous loops. If you die, you get desynced; you can't deal damage or contest objective, but your potential actions are still being recorded. Take a health pack to resync back in time. In the final loop, you must have at least 1 clone standing in the objective, uncontested.\r\n\r\nMore workshops: workshop.codes/users/DragonEngineer\r\nDragonEngineer's Workshop Discord: discord.gg/9su249k"
  • Mode Name: "Quantum Clash"
  • }
  • lobby
  • {
  • Map Rotation: After A Game
  • Max Spectators: 6
  • Max Team 1 Players: 1
  • Max Team 2 Players: 1
  • Return To Lobby: Never
  • }
  • modes
  • {
  • Team Deathmatch
  • {
  • Mercy Resurrect Counteracts Kills: Off
  • Score To Win: 3
  • enabled maps
  • {
  • Black Forest
  • Black Forest Winter
  • Castillo
  • Ecopoint: Antarctica
  • Ecopoint: Antarctica Winter
  • Ilios Ruins
  • Necropolis
  • }
  • }
  • General
  • {
  • Hero Limit: Off
  • Kill Cam: Off
  • Kill Feed: Off
  • Spawn Health Packs: Disabled
  • }
  • }
  • heroes
  • {
  • General
  • {
  • Quick Melee: Off
  • Ultimate Ability: Off
  • Ashe
  • {
  • Coach Gun: Off
  • Damage Dealt: 173%
  • Dynamite: Off
  • No Automatic Fire: On
  • }
  • Baptiste
  • {
  • Damage Dealt: 146%
  • Immortality Field: Off
  • Regenerative Burst: Off
  • Secondary Fire: Off
  • }
  • Cassidy
  • {
  • Combat Roll: Off
  • Damage Dealt: 122%
  • Flashbang: Off
  • Secondary Fire: Off
  • }
  • Pharah
  • {
  • Concussive Blast: Off
  • Damage Dealt: 167%
  • Hover Jets: Off
  • Jump Jet: Off
  • Projectile Speed: 85%
  • Rocket Launcher Knockback Scalar: 0%
  • }
  • Reaper
  • {
  • Damage Dealt: 159%
  • Health: 80%
  • Shadow Step: Off
  • Wraith Form: Off
  • }
  • Soldier: 76
  • {
  • Biotic Field: Off
  • Damage Dealt: 150%
  • Helix Rockets: Off
  • Sprint: Off
  • }
  • Zarya
  • {
  • Damage Dealt: 373%
  • Health: 50%
  • Particle Barrier: Off
  • Projected Barrier: Off
  • Secondary Fire: Off
  • }
  • enabled heroes
  • {
  • Ashe
  • Baptiste
  • Cassidy
  • Pharah
  • Reaper
  • Soldier: 76
  • Zarya
  • }
  • }
  • }
  • }
  • variables
  • {
  • global:
  • 0: controlIndex
  • 1: currentFrame
  • 2: loop
  • 3: gameIsRecording
  • 4: gameIsOverTime
  • 5: objectivePosition
  • 6: objectiveRadius
  • 7: defaultStartingPosition
  • 8: defaultFacingDirection
  • 9: constHealthPackLocation
  • 10: currentHealthPackLocation
  • 11: hasFinishedIntro
  • 12: overtimePositionEffectsID
  • 13: overtimeHeroTextsID
  • 14: introCameraPos
  • player:
  • 0: actionEnum
  • 1: positionValues
  • 2: positionFrame
  • 3: directionValues
  • 4: directionFrame
  • 5: throttleValues
  • 6: throttleFrame
  • 7: jumpValues
  • 8: jumpFrame
  • 9: crouchValues
  • 10: crouchFrame
  • 11: primaryFireValues
  • 12: primaryFireFrame
  • 13: secondaryFireValues
  • 14: secondaryFireFrame
  • 15: reloadValues
  • 16: reloadFrame
  • 17: sprintValues
  • 18: sprintFrame
  • 19: clipActionValue
  • 20: clipIndices
  • 21: clipThrottleValue
  • 22: baptisteCrouching
  • 23: isDesynced
  • 24: selectedHeroes
  • 25: overtimePosition
  • 26: overtimeDirection
  • 27: overtimeHeroes
  • 28: overtimeIsDesynced
  • 29: overtimeHealth
  • 30: overtimeAmmo
  • }
  • subroutines
  • {
  • 0: ResetRecording
  • 1: RecordPosition
  • 2: RecordDirection
  • 3: RecordThrottle
  • 4: RecordJumping
  • 5: RecordCrouching
  • 6: RecordPrimaryFire
  • 7: RecordSecondaryFire
  • 8: RecordReloading
  • 9: RecordSprinting
  • 11: RecordFrame
  • 12: PrepareReplay
  • 13: ReplayPosition
  • 14: ReplayDirection
  • 15: ReplayThrottle
  • 16: ReplayJumping
  • 17: ReplayCrouching
  • 18: ReplayPrimaryFire
  • 19: ReplaySecondaryFire
  • 20: ReplayReloading
  • 21: ReplaySprinting
  • 23: ReplayFrame
  • 24: Introduction
  • 25: ChangeAmmo
  • 26: RecordOvertimeData
  • 27: EndingLoop
  • }
  • disabled rule("----- Gameplay mechanics -----")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • }
  • rule("Init Global Variables and disable stuff")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • actions
  • {
  • Global.objectiveRadius = 4;
  • Global.gameIsRecording = False;
  • Global.gameIsOverTime = False;
  • Global.hasFinishedIntro = False;
  • Global.overtimePositionEffectsID = Empty Array;
  • Global.overtimeHeroTextsID = Empty Array;
  • Disable Built-In Game Mode Scoring;
  • Disable Built-In Game Mode Announcer;
  • Disable Built-In Game Mode Completion;
  • Disable Inspector Recording;
  • }
  • }
  • rule("Init Player Variables")
  • {
  • event
  • {
  • Player Joined Match;
  • All;
  • All;
  • }
  • actions
  • {
  • If(!Is Dummy Bot(Event Player));
  • Call Subroutine(ResetRecording);
  • Event Player.selectedHeroes = Empty Array;
  • Else;
  • Call Subroutine(PrepareReplay);
  • End;
  • "Variables"
  • Event Player.isDesynced = False;
  • Event Player.overtimePosition = Empty Array;
  • Event Player.overtimeDirection = Empty Array;
  • Event Player.overtimeHeroes = Empty Array;
  • Event Player.overtimeIsDesynced = Empty Array;
  • Event Player.overtimeHealth = Empty Array;
  • Event Player.overtimeAmmo = Empty Array;
  • "Change health"
  • Set Max Health(Event Player, 1);
  • Add Health Pool To Player(Event Player, Health, 200 - Max Health(Event Player), True, False);
  • "Disable collision and healing"
  • Disable Movement Collision With Players(Event Player);
  • Disable Built-In Game Mode Respawning(Event Player);
  • Set Healing Dealt(Event Player, 0);
  • Set Healing Received(Event Player, 0);
  • "Set to be unkillable"
  • Set Status(Event Player, Null, Unkillable, 9999);
  • }
  • }
  • rule("[Assemble Heroes] - Preparing next round, resync all players, set status and disable weapon/reload")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Is Assembling Heroes == True;
  • Global.loop <= 3;
  • }
  • actions
  • {
  • Global.loop += 1;
  • Global.currentFrame = 0;
  • Set Match Time(5);
  • "Reset health packs location"
  • Global.currentHealthPackLocation = Global.constHealthPackLocation;
  • "Resync all players"
  • All Players(All Teams).isDesynced = False;
  • Clear Status(All Players(All Teams), Hacked);
  • Set Damage Dealt(All Players(All Teams), 100);
  • Set Invisible(All Players(All Teams), None);
  • "In case Baptiste's jump is disabled through mid round"
  • Set Jump Enabled(All Players(All Teams), True);
  • "Beyond this point, the bots have spawned"
  • Wait(3, Ignore Condition);
  • "Set status, disallow shooting/reloading"
  • Set Status(All Players(All Teams), Null, Invincible, 9999);
  • Set Status(All Players(All Teams), Null, Rooted, 9999);
  • Disallow Button(All Players(All Teams), Button(Primary Fire));
  • Disallow Button(All Players(All Teams), Button(Secondary Fire));
  • Set Reload Enabled(All Players(All Teams), False);
  • "Non-overtime mode ends here"
  • Abort If(!Global.gameIsOverTime);
  • "Create effects to show the position of players during overtime"
  • If(Global.loop == 1);
  • For Global Variable(controlIndex, 1, 3, 1);
  • "Effects"
  • Create Effect(All Players(All Teams), Bad Aura, Color(Team 1), Players In Slot(0, Team 1).overtimePosition[Global.controlIndex], 1,
  • Visible To);
  • Modify Global Variable(overtimePositionEffectsID, Append To Array, Last Created Entity);
  • Create Effect(All Players(All Teams), Bad Aura, Color(Team 2), Players In Slot(0, Team 2).overtimePosition[Global.controlIndex], 1,
  • Visible To);
  • Modify Global Variable(overtimePositionEffectsID, Append To Array, Last Created Entity);
  • "Hero icons"
  • Create In-World Text(All Players(All Teams), Custom String("{0} {1}", Hero Icon String(Players In Slot(0, Team 1)
  • .overtimeHeroes[Global.controlIndex]), Global.controlIndex + 1), Players In Slot(0, Team 1)
  • .overtimePosition[Global.controlIndex], 2, Clip Against Surfaces, Visible To, Color(Team 1), Default Visibility);
  • Modify Global Variable(overtimeHeroTextsID, Append To Array, Last Text ID);
  • Create In-World Text(All Players(All Teams), Custom String("{0} {1}", Hero Icon String(Players In Slot(0, Team 2)
  • .overtimeHeroes[Global.controlIndex]), Global.controlIndex + 1), Players In Slot(0, Team 2)
  • .overtimePosition[Global.controlIndex], 2, Clip Against Surfaces, Visible To, Color(Team 2), Default Visibility);
  • Modify Global Variable(overtimeHeroTextsID, Append To Array, Last Text ID);
  • End;
  • Else;
  • Destroy Effect(Global.overtimePositionEffectsID[2 * Global.loop - 4]);
  • Destroy Effect(Global.overtimePositionEffectsID[2 * Global.loop - 3]);
  • Destroy In-World Text(Global.overtimeHeroTextsID[2 * Global.loop - 4]);
  • Destroy In-World Text(Global.overtimeHeroTextsID[2 * Global.loop - 3]);
  • End;
  • }
  • }
  • rule("[Assemble Heroes] - Summon bots and reset recording")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Is Dummy Bot(Event Player) == False;
  • Is Assembling Heroes == True;
  • Global.loop > 1;
  • }
  • actions
  • {
  • Wait(0.100, Ignore Condition);
  • Create Dummy Bot(Event Player.selectedHeroes[Global.loop - 2], Team Of(Event Player), Global.loop - 1, Global.objectivePosition,
  • Vector(0, 0, 0));
  • Wait(3, Ignore Condition);
  • Call Subroutine(ResetRecording);
  • }
  • }
  • rule("[Assemble Heroes] - For overtime, only allow that hero")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Is Dummy Bot(Event Player) == False;
  • Is Assembling Heroes == True;
  • Global.gameIsOverTime == True;
  • }
  • actions
  • {
  • Wait(0.100, Ignore Condition);
  • Set Player Allowed Heroes(Event Player, Event Player.overtimeHeroes[Global.loop - 1]);
  • }
  • }
  • rule("[Assemble Heroes] - Temporary Fix - Force Slot 1 bots to be their hero")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Is Assembling Heroes == True;
  • Is Dummy Bot(Event Player) == True;
  • Global.loop == 3;
  • }
  • actions
  • {
  • Wait(0.100, Ignore Condition);
  • Start Forcing Player To Be Hero(Event Player, Players In Slot(0, Team Of(Event Player)).selectedHeroes[0]);
  • }
  • }
  • rule("[Introduction] Show intro at the start")
  • {
  • event
  • {
  • Subroutine;
  • Introduction;
  • }
  • actions
  • {
  • Wait(1, Ignore Condition);
  • "Welcome"
  • Start Camera(All Players(All Teams), Global.introCameraPos, Global.objectivePosition + Vector(0, 10, 0), 5);
  • Small Message(All Players(All Teams), Custom String("Welcome to Quantum Clash!"));
  • Wait(3, Ignore Condition);
  • "You will play through 3 loops..."
  • Start Camera(All Players(Team 1), Eye Position(Players In Slot(0, Team 1)) + World Vector Of(Vector(0, 0.500, 1), Players In Slot(
  • 0, Team 1), Rotation) * 2, Eye Position(Players In Slot(0, Team 1)), 5);
  • Start Camera(All Players(Team 2), Eye Position(Players In Slot(0, Team 2)) + World Vector Of(Vector(0, 0.500, 1), Players In Slot(
  • 0, Team 2), Rotation) * 2, Eye Position(Players In Slot(0, Team 2)), 5);
  • Small Message(All Players(All Teams), Custom String("You will play through 3 time loops of yourself."));
  • Wait(3, Ignore Condition);
  • Small Message(All Players(All Teams), Custom String("A clone will replay your actions in the previous loops."));
  • Wait(3, Ignore Condition);
  • "Desynced info"
  • Start Camera(All Players(All Teams), Ray Cast Hit Position(Global.constHealthPackLocation[0],
  • Global.constHealthPackLocation[0] + Normalize(Vector(1, 1, 1)) * 5, Null, All Players(All Teams), True),
  • Global.constHealthPackLocation[0], 5);
  • Small Message(All Players(All Teams), Custom String("If you die, you get desynced {0} from the timeline.", Icon String(Spiral)));
  • Wait(3, Ignore Condition);
  • Small Message(All Players(All Teams), Custom String("You cannot contest objective {0} or damage enemies...", Icon String(Flag)));
  • Wait(3, Ignore Condition);
  • Small Message(All Players(All Teams), Custom String("...but your potential actions are still recorded."));
  • Wait(3, Ignore Condition);
  • Small Message(All Players(All Teams), Custom String("Pick up a health pack to resync back in time."));
  • Wait(3, Ignore Condition);
  • "By end of loop 3"
  • Start Camera(All Players(All Teams), Ray Cast Hit Position(Global.objectivePosition, Global.objectivePosition + Normalize(Vector(1,
  • 1, -1)) * 10, Null, All Players(All Teams), True), Global.objectivePosition, 5);
  • Small Message(All Players(All Teams), Custom String("By the end of the final loop..."));
  • Wait(3, Ignore Condition);
  • Small Message(All Players(All Teams), Custom String("...you must have at least 1 synced clone..."));
  • Wait(3, Ignore Condition);
  • Small Message(All Players(All Teams), Custom String("...standing in the objective {0}, uncontested.", Icon String(Flag)));
  • Wait(3, Ignore Condition);
  • "Created by DragonEngineer"
  • Small Message(All Players(All Teams), Custom String("Created by DragonEngineer."));
  • Stop Camera(All Players(All Teams));
  • Global.hasFinishedIntro = True;
  • }
  • }
  • rule("[Starting] - Pause match time at the start, disable music")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Is Game In Progress == True;
  • }
  • actions
  • {
  • Wait(0.250, Ignore Condition);
  • Disable Built-In Game Mode Music;
  • Pause Match Time;
  • Set Match Time(20);
  • Set Objective Description(All Players(All Teams), Custom String("Get ready!"), Visible To and String);
  • }
  • }
  • rule("[Starting] - Teleport to starting location, init overtime data if it's overtime")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Is Game In Progress == True;
  • Has Spawned(Event Player) == True;
  • }
  • actions
  • {
  • Wait(0.100, Ignore Condition);
  • "Change ammo count"
  • Call Subroutine(ChangeAmmo);
  • "If not in overtime, then teleport to default location"
  • If(!Global.gameIsOverTime);
  • If(Team Of(Event Player) == Team 1);
  • Teleport(Event Player, Global.defaultStartingPosition[0]);
  • Start Facing(Event Player, Global.defaultFacingDirection[0], 10000, To World, Direction and Turn Rate);
  • Else;
  • Teleport(Event Player, Global.defaultStartingPosition[1]);
  • Start Facing(Event Player, Global.defaultFacingDirection[1], 10000, To World, Direction and Turn Rate);
  • End;
  • "For overtime, teleport to where they ended, and init overtime data"
  • Else;
  • If(!Is Dummy Bot(Event Player));
  • Start Forcing Player Position(Event Player, Event Player.overtimePosition[Global.loop - 1], False);
  • Start Facing(Event Player, Event Player.overtimeDirection[Global.loop - 1], 10000, To World, Direction and Turn Rate);
  • Set Player Health(Event Player, Event Player.overtimeHealth[Global.loop - 1]);
  • Event Player.isDesynced = Event Player.overtimeIsDesynced[Global.loop - 1];
  • Set Ammo(Event Player, 0, Event Player.overtimeAmmo[Global.loop - 1]);
  • Else;
  • Start Forcing Player Position(Event Player, Players In Slot(0, Team Of(Event Player)).overtimePosition[Slot Of(Event Player) - 1],
  • False);
  • Start Facing(Event Player, Players In Slot(0, Team Of(Event Player)).overtimeDirection[Slot Of(Event Player) - 1], 10000, To World,
  • Direction and Turn Rate);
  • Set Player Health(Event Player, Players In Slot(0, Team Of(Event Player)).overtimeHealth[Slot Of(Event Player) - 1]);
  • Event Player.isDesynced = Players In Slot(0, Team Of(Event Player)).overtimeIsDesynced[Slot Of(Event Player) - 1];
  • Set Ammo(Event Player, 0, Players In Slot(0, Team Of(Event Player)).overtimeAmmo[Slot Of(Event Player) - 1]);
  • End;
  • End;
  • "For starting out desynced"
  • If(Event Player.isDesynced);
  • Set Status(Event Player, Null, Hacked, 9999);
  • Set Invisible(Event Player, Enemies);
  • Set Damage Dealt(Event Player, 0);
  • End;
  • "Skip this step for dummy bot"
  • Skip If(Is Dummy Bot(Event Player), 2);
  • Modify Player Variable(Event Player, selectedHeroes, Append To Array, Hero Of(Event Player));
  • Reset Player Hero Availability(Event Player);
  • }
  • }
  • rule("[Starting] - Everyone has spawned, starting game.")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Is True For All(All Players(All Teams), Has Spawned(Current Array Element)) == True;
  • Is Game In Progress == True;
  • }
  • actions
  • {
  • Wait(1.100, Ignore Condition);
  • "Run intro"
  • If(!Global.hasFinishedIntro);
  • Call Subroutine(Introduction);
  • End;
  • "Set frozen"
  • Set Status(All Players(All Teams), Null, Frozen, 9999);
  • "Starting..."
  • Big Message(All Players(All Teams), Custom String("Syncing the clock!"));
  • Wait(3, Ignore Condition);
  • "3..."
  • Small Message(All Players(All Teams), Custom String("3..."));
  • Play Effect(All Players(All Teams), Buff Explosion Sound, Color(White), Global.objectivePosition, 150);
  • Wait(1, Ignore Condition);
  • "2..."
  • Small Message(All Players(All Teams), Custom String("2..."));
  • Play Effect(All Players(All Teams), Buff Explosion Sound, Color(White), Global.objectivePosition, 150);
  • Wait(1, Ignore Condition);
  • "1..."
  • Small Message(All Players(All Teams), Custom String("1..."));
  • Play Effect(All Players(All Teams), Buff Explosion Sound, Color(White), Global.objectivePosition, 150);
  • Wait(1, Ignore Condition);
  • "Go!!!"
  • Small Message(All Players(All Teams), String("{0}!!!", String("Go")));
  • "Big message for current loop"
  • If(Global.loop == 1);
  • Big Message(All Players(All Teams), Custom String("First Loop"));
  • Set Objective Description(All Players(All Teams), Custom String("First Loop"), Visible To and String);
  • Else If(Global.loop == 2);
  • Big Message(All Players(All Teams), Custom String("Second Loop"));
  • Set Objective Description(All Players(All Teams), Custom String("Second Loop"), Visible To and String);
  • Else;
  • Big Message(All Players(All Teams), Custom String("Final Loop"));
  • Set Objective Description(All Players(All Teams), Custom String("Final Loop"), Visible To and String);
  • End;
  • Play Effect(All Players(All Teams), Ring Explosion Sound, Color(White), Global.objectivePosition, 150);
  • "Clear statuses"
  • Clear Status(All Players(All Teams), Frozen);
  • Clear Status(All Players(All Teams), Invincible);
  • Clear Status(All Players(All Teams), Rooted);
  • "Stop facing/stop forcing position"
  • Stop Forcing Player Position(All Players(All Teams));
  • Stop Facing(All Players(All Teams));
  • "Re-allow weapon/reload"
  • Allow Button(All Players(All Teams), Button(Primary Fire));
  • Allow Button(All Players(All Teams), Button(Secondary Fire));
  • Set Reload Enabled(All Players(All Teams), True);
  • "Give phased out to desynced players"
  • Set Status(Filtered Array(All Players(All Teams), Current Array Element.isDesynced), Null, Phased Out, 9999);
  • "Set game is running to true"
  • Global.gameIsRecording = True;
  • Unpause Match Time;
  • }
  • }
  • rule("[Starting] [Subroutine] - Changing ammo count when spawned")
  • {
  • event
  • {
  • Subroutine;
  • ChangeAmmo;
  • }
  • actions
  • {
  • "Change ammo"
  • If(Hero Of(Event Player) == Hero(Ashe));
  • Set Ammo(Event Player, 0, 1);
  • Set Max Ammo(Event Player, 0, 1);
  • Else If(Hero Of(Event Player) == Hero(Baptiste));
  • Set Ammo(Event Player, 0, 12);
  • Set Max Ammo(Event Player, 0, 12);
  • Else If(Hero Of(Event Player) == Hero(Cassidy));
  • Set Ammo(Event Player, 0, 6);
  • Set Max Ammo(Event Player, 0, 6);
  • Else If(Hero Of(Event Player) == Hero(Pharah));
  • Set Ammo(Event Player, 0, 1);
  • Set Max Ammo(Event Player, 0, 1);
  • Else If(Hero Of(Event Player) == Hero(Reaper));
  • Set Ammo(Event Player, 0, 4);
  • Set Max Ammo(Event Player, 0, 4);
  • Else If(Hero Of(Event Player) == Hero(Soldier: 76));
  • Set Ammo(Event Player, 0, 16);
  • Set Max Ammo(Event Player, 0, 16);
  • Else If(Hero Of(Event Player) == Hero(Zarya));
  • Set Ammo(Event Player, 0, 40);
  • Set Max Ammo(Event Player, 0, 40);
  • End;
  • }
  • }
  • rule("[Ending] - Slow motion when gonna time's up")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Is Game In Progress == True;
  • Match Time < 2;
  • }
  • actions
  • {
  • Set Slow Motion(50);
  • Wait(1.500, Ignore Condition);
  • Set Slow Motion(25);
  • Wait(0.500, Ignore Condition);
  • Set Slow Motion(100);
  • }
  • }
  • rule("[Ending] - When reached 0s, for 1st and 2nd loop, prepare next loop")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Is Game In Progress == True;
  • Match Time == 0;
  • Global.loop < 3;
  • }
  • actions
  • {
  • Global.gameIsRecording = False;
  • "Call the end of loop sequence"
  • Call Subroutine(EndingLoop);
  • Big Message(All Players(All Teams), Custom String("Loop {0} ends", Global.loop));
  • "Clear frozen effects"
  • Wait(3, Ignore Condition);
  • Set Gravity(All Players(All Teams), 100);
  • Clear Status(All Players(All Teams), Invincible);
  • Clear Status(All Players(All Teams), Frozen);
  • "Return to assemble hero"
  • Go To Assemble Heroes;
  • }
  • }
  • rule("[Ending] - When reached 0s, for final loop, determine winner")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Is Game In Progress == True;
  • Match Time == 0;
  • Global.loop == 3;
  • }
  • actions
  • {
  • Global.gameIsRecording = False;
  • "Call the end of loop sequence"
  • Call Subroutine(EndingLoop);
  • "Team 1 wins"
  • If(Count Of(Filtered Array(Players Within Radius(Global.objectivePosition, Global.objectiveRadius, Team 1, Surfaces),
  • !Current Array Element.isDesynced)) > 0 && Count Of(Filtered Array(Players Within Radius(Global.objectivePosition,
  • Global.objectiveRadius, Team 2, Surfaces), !Current Array Element.isDesynced)) == 0);
  • Big Message(All Players(Team 1), Custom String("{0} {1}!", String("You"), String("Score")));
  • Big Message(All Players(Team 2), Custom String("{0} {1}!", String("Enemy"), String("Scores")));
  • Modify Team Score(Team 1, 1);
  • Global.gameIsOverTime = False;
  • "Team 2 wins"
  • Else If(Count Of(Filtered Array(Players Within Radius(Global.objectivePosition, Global.objectiveRadius, Team 1, Surfaces),
  • !Current Array Element.isDesynced)) == 0 && Count Of(Filtered Array(Players Within Radius(Global.objectivePosition,
  • Global.objectiveRadius, Team 2, Surfaces), !Current Array Element.isDesynced)) > 0);
  • Big Message(All Players(Team 2), Custom String("{0} {1}!", String("You"), String("Score")));
  • Big Message(All Players(Team 1), Custom String("{0} {1}!", String("Enemy"), String("Scores")));
  • Modify Team Score(Team 2, 1);
  • Global.gameIsOverTime = False;
  • "No winner, round draw"
  • Else;
  • Big Message(All Players(All Teams), Custom String("{0}!", String("Overtime")));
  • Global.gameIsOverTime = True;
  • "Record overtime data"
  • Call Subroutine(RecordOvertimeData);
  • End;
  • "Clear frozen effects"
  • Wait(5, Ignore Condition);
  • Set Gravity(All Players(All Teams), 100);
  • Clear Status(All Players(All Teams), Invincible);
  • Clear Status(All Players(All Teams), Frozen);
  • "Destroy dummy bots"
  • Destroy All Dummy Bots;
  • "Reset selected heroes"
  • All Players(All Teams).selectedHeroes = Empty Array;
  • "Reset the effects array"
  • Global.overtimePositionEffectsID = Empty Array;
  • Global.overtimeHeroTextsID = Empty Array;
  • "if there's a winner, declare them winner"
  • If(Team Score(Team 1) == 3);
  • Declare Team Victory(Team 1);
  • Else If(Team Score(Team 2) == 3);
  • Declare Team Victory(Team 2);
  • Else;
  • Global.loop = 0;
  • Go To Assemble Heroes;
  • End;
  • }
  • }
  • rule("[Ending] - Stop replaying for bot-players")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Is Dummy Bot(Event Player) == True;
  • Global.loop > 1;
  • Match Time == 0;
  • Is Game In Progress == True;
  • }
  • actions
  • {
  • Stop Holding Button(Event Player, Button(Primary Fire));
  • Stop Holding Button(Event Player, Button(Secondary Fire));
  • Stop Holding Button(Event Player, Button(Jump));
  • Stop Holding Button(Event Player, Button(Crouch));
  • Stop Holding Button(Event Player, Button(Reload));
  • Stop Holding Button(Event Player, Button(Ability 1));
  • Stop Throttle In Direction(Event Player);
  • Event Player.clipActionValue = 0;
  • Event Player.clipIndices = Empty Array;
  • Event Player.clipThrottleValue = 0;
  • }
  • }
  • rule("[Ending] [Subroutine] - End of loop sequence")
  • {
  • event
  • {
  • Subroutine;
  • EndingLoop;
  • }
  • actions
  • {
  • "Remove any existing phased out for desynced players"
  • Clear Status(All Players(All Teams), Phased Out);
  • "Freeze players on the spot"
  • Set Gravity(All Players(All Teams), 0);
  • Set Status(All Players(All Teams), Null, Frozen, 9999);
  • Set Status(All Players(All Teams), Null, Invincible, 9999);
  • Apply Impulse(All Players(All Teams), Down, 0.001, To World, Cancel Contrary Motion);
  • Apply Impulse(All Players(All Teams), Up, 0.001, To World, Cancel Contrary Motion);
  • Apply Impulse(All Players(All Teams), Backward, 0.001, To World, Cancel Contrary Motion);
  • Apply Impulse(All Players(All Teams), Forward, 0.001, To World, Cancel Contrary Motion);
  • Apply Impulse(All Players(All Teams), Right, 0.001, To World, Cancel Contrary Motion);
  • Apply Impulse(All Players(All Teams), Left, 0.001, To World, Cancel Contrary Motion);
  • "Re-enable music"
  • Enable Built-In Game Mode Music;
  • }
  • }
  • rule("[Ending] [Subroutine] - Record overtime data")
  • {
  • event
  • {
  • Subroutine;
  • RecordOvertimeData;
  • }
  • actions
  • {
  • "Fill in Overtime detail for Team 1 Player"
  • Players In Slot(0, Team 1).overtimePosition = Array(Position Of(Players In Slot(1, Team 1)), Position Of(Players In Slot(2,
  • Team 1)), Position Of(Players In Slot(0, Team 1)));
  • Players In Slot(0, Team 1).overtimeDirection = Array(Facing Direction Of(Players In Slot(1, Team 1)), Facing Direction Of(
  • Players In Slot(2, Team 1)), Facing Direction Of(Players In Slot(0, Team 1)));
  • Players In Slot(0, Team 1).overtimeHeroes = Array(Hero Of(Players In Slot(1, Team 1)), Hero Of(Players In Slot(2, Team 1)),
  • Hero Of(Players In Slot(0, Team 1)));
  • Players In Slot(0, Team 1).overtimeIsDesynced = Array(Players In Slot(1, Team 1).isDesynced, Players In Slot(2, Team 1).isDesynced,
  • Players In Slot(0, Team 1).isDesynced);
  • Players In Slot(0, Team 1).overtimeHealth = Array(Health(Players In Slot(1, Team 1)), Health(Players In Slot(2, Team 1)), Health(
  • Players In Slot(0, Team 1)));
  • Players In Slot(0, Team 1).overtimeAmmo = Array(Ammo(Players In Slot(1, Team 1), 0), Ammo(Players In Slot(2, Team 1), 0), Ammo(
  • Players In Slot(0, Team 1), 0));
  • "Fill in Overtime details for Team 2 player"
  • Players In Slot(0, Team 2).overtimePosition = Array(Position Of(Players In Slot(1, Team 2)), Position Of(Players In Slot(2,
  • Team 2)), Position Of(Players In Slot(0, Team 2)));
  • Players In Slot(0, Team 2).overtimeDirection = Array(Facing Direction Of(Players In Slot(1, Team 2)), Facing Direction Of(
  • Players In Slot(2, Team 2)), Facing Direction Of(Players In Slot(0, Team 2)));
  • Players In Slot(0, Team 2).overtimeHeroes = Array(Hero Of(Players In Slot(1, Team 2)), Hero Of(Players In Slot(2, Team 2)),
  • Hero Of(Players In Slot(0, Team 2)));
  • Players In Slot(0, Team 2).overtimeIsDesynced = Array(Players In Slot(1, Team 2).isDesynced, Players In Slot(2, Team 2).isDesynced,
  • Players In Slot(0, Team 2).isDesynced);
  • Players In Slot(0, Team 2).overtimeHealth = Array(Health(Players In Slot(1, Team 2)), Health(Players In Slot(2, Team 2)), Health(
  • Players In Slot(0, Team 2)));
  • Players In Slot(0, Team 2).overtimeAmmo = Array(Ammo(Players In Slot(1, Team 2), 0), Ammo(Players In Slot(2, Team 2), 0), Ammo(
  • Players In Slot(0, Team 2), 0));
  • }
  • }
  • rule("[Desynced] When reach 1 health, become desynced")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Is Game In Progress == True;
  • Global.gameIsRecording == True;
  • Health Of Type(Event Player, Health) <= 1;
  • Event Player.isDesynced == False;
  • }
  • actions
  • {
  • Event Player.isDesynced = True;
  • Small Message(Event Player, Custom String("Keep playing! Your actions are still recorded."));
  • Set Status(Event Player, Null, Hacked, 9999);
  • Set Status(Event Player, Null, Phased Out, 9999);
  • Set Invisible(Event Player, Enemies);
  • Set Damage Dealt(Event Player, 0);
  • }
  • }
  • rule("[Health Pack] If picked up health pack, heal player and resync again")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Is Game In Progress == True;
  • Global.gameIsRecording == True;
  • Is True For Any(Global.currentHealthPackLocation, Distance Between(Position Of(Event Player), Current Array Element) <= 1.150)
  • == True;
  • Has Spawned(Event Player) == True;
  • }
  • actions
  • {
  • Set Player Health(Event Player, Max Health(Event Player));
  • Play Effect(All Players(All Teams), Good Explosion, Color(Lime Green), Event Player, 3);
  • Play Effect(Event Player, Buff Impact Sound, Color(White), Event Player, 100);
  • "Despawn health pack"
  • Global.controlIndex = Index Of Array Value(Global.currentHealthPackLocation, Filtered Array(Global.currentHealthPackLocation,
  • Distance Between(Position Of(Event Player), Current Array Element) <= 1.150));
  • Global.currentHealthPackLocation[Global.controlIndex] += Vector(0, -100, 0);
  • "Resync if desynced"
  • If(Event Player.isDesynced);
  • Event Player.isDesynced = False;
  • Small Message(Event Player, Custom String("Back in time!"));
  • Clear Status(Event Player, Hacked);
  • Clear Status(Event Player, Phased Out);
  • Set Invisible(Event Player, None);
  • Set Damage Dealt(Event Player, 100);
  • End;
  • }
  • }
  • rule("[Falling off the map] Teleport to the nearest walkable position, set to 1 hp")
  • {
  • event
  • {
  • Player Died;
  • All;
  • All;
  • }
  • conditions
  • {
  • Event Was Environment == True;
  • }
  • actions
  • {
  • Teleport(Event Player, Nearest Walkable Position(Event Player));
  • Resurrect(Event Player);
  • Wait(0.100, Ignore Condition);
  • Set Player Health(Event Player, 1);
  • }
  • }
  • rule("[HUD and effects] Create objective effects and HUD")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • actions
  • {
  • "Objective position"
  • Create Effect(All Players(All Teams), Sphere, Color(Orange), Global.objectivePosition, Global.objectiveRadius,
  • Visible To Position and Radius);
  • Create Icon(All Players(All Teams), Global.objectivePosition + Vector(0, 2, 0), Flag, Visible To and Position, Color(Aqua), True);
  • "Gap for the Big Message"
  • Create HUD Text(All Players(All Teams), Null, Null, Custom String(" "), Top, 1, Color(White), Color(White), Color(White),
  • Visible To and String, Default Visibility);
  • "Desynced status"
  • Create HUD Text(Local Player.isDesynced ? Local Player : Null, Custom String(" {0} Desynced {0} ", Icon String(Spiral)),
  • Custom String(" "), Custom String(" "), Top, 2, Color(Purple), Color(White), Color(White), Visible To and String,
  • Visible Never);
  • "Sprint status"
  • Create HUD Text(Is Button Held(Local Player, Button(Ability 1)) && Is Moving(Local Player) && !Is Crouching(Local Player)
  • ? Local Player : Null, Custom String("{0} Sprinting... {0}", Ability Icon String(Hero(Soldier: 76), Button(Ability 1)),
  • Input Binding String(Button(Ability 1))), Custom String(" "), Custom String(" "), Left, 0, Color(Lime Green), Color(White),
  • Color(White), Visible To and String, Visible Never);
  • Create HUD Text(!Is Button Held(Local Player, Button(Ability 1)) || !Is Moving(Local Player) || Is Crouching(Local Player)
  • ? Local Player : Null, Custom String("{0} Sprint: Hold {1} ", Ability Icon String(Hero(Soldier: 76), Button(Ability 1)),
  • Input Binding String(Button(Ability 1))), Custom String(" "), Custom String(" "), Left, 0, Color(Yellow), Color(White), Color(
  • White), Visible To and String, Visible Never);
  • "Players on objective"
  • Create HUD Text(All Players(Team 1), Custom String(" {0} [ {1} ] {2} ", Custom String("{0} {2} < {1}", Count Of(Filtered Array(
  • Players Within Radius(Global.objectivePosition, Global.objectiveRadius, Team 1, Surfaces), !Current Array Element.isDesynced)),
  • String("You"), Ability Icon String(Hero(Genji), Button(Jump))), Icon String(Flag), Custom String("{0} > {1} {2}", String(
  • "Enemy"), Count Of(Filtered Array(Players Within Radius(Global.objectivePosition, Global.objectiveRadius, Team 2, Surfaces),
  • !Current Array Element.isDesynced)), Ability Icon String(Hero(Genji), Button(Jump)))), Custom String(" "), Custom String(" "),
  • Top, 0, Color(Aqua), Color(White), Color(White), Visible To and String, Visible Never);
  • Create HUD Text(All Players(Team 2), Custom String(" {0} [ {1} ] {2} ", Custom String("{0} {2} < {1}", Count Of(Filtered Array(
  • Players Within Radius(Global.objectivePosition, Global.objectiveRadius, Team 2, Surfaces), !Current Array Element.isDesynced)),
  • String("You"), Ability Icon String(Hero(Genji), Button(Jump))), Icon String(Flag), Custom String("{0} > {1} {2}", String(
  • "Enemy"), Count Of(Filtered Array(Players Within Radius(Global.objectivePosition, Global.objectiveRadius, Team 1, Surfaces),
  • !Current Array Element.isDesynced)), Ability Icon String(Hero(Genji), Button(Jump)))), Custom String(" "), Custom String(" "),
  • Top, 0, Color(Aqua), Color(White), Color(White), Visible To and String, Visible Never);
  • "Creator info"
  • Create HUD Text(All Players(All Teams), Custom String(" HMVX24 "), Custom String("{0} Quantum Clash by DragonEngineer",
  • Ability Icon String(Hero(Tracer), Button(Ability 2))), Custom String("discord.gg/9su249k [All lowercase]"), Right, 0, Color(
  • Purple), Color(Green), Color(Yellow), Visible To and String, Default Visibility);
  • }
  • }
  • rule("[Effects] Create health packs")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Global.constHealthPackLocation != 0;
  • }
  • actions
  • {
  • For Global Variable(controlIndex, 0, Count Of(Global.constHealthPackLocation), 1);
  • Create Effect(All Players(All Teams), Ring, Color(Green), Global.constHealthPackLocation[Evaluate Once(Global.controlIndex)],
  • 0.600, Visible To Position and Radius);
  • Create Effect(All Players(All Teams), Orb, Color(Green), Global.currentHealthPackLocation[Evaluate Once(Global.controlIndex)
  • ] + Vector(0, 0.800, 0), 1, Visible To Position and Radius);
  • Create In-World Text(All Players(All Teams), Icon String(Plus), Global.currentHealthPackLocation[Evaluate Once(Global.controlIndex)
  • ] + Vector(0, 1, 0), 1.500, Clip Against Surfaces, Visible To and Position, Color(White), Default Visibility);
  • End;
  • }
  • }
  • rule("[HUD] Shows player's current HP/desync status")
  • {
  • event
  • {
  • Player Joined Match;
  • All;
  • All;
  • }
  • conditions
  • {
  • Is Dummy Bot(Event Player) == True;
  • }
  • actions
  • {
  • Create HUD Text(!Event Player.isDesynced ? All Players(Team Of(Event Player)) : Null, Custom String("{0} {1}: {2}/200 HP ",
  • Hero Icon String(Hero Of(Event Player)), Slot Of(Event Player), Health(Event Player)), Custom String(" "), Custom String(" "),
  • Left, Slot Of(Event Player), Color(Orange), Color(White), Color(White), Visible To and String, Visible Never);
  • Create HUD Text(Event Player.isDesynced ? All Players(Team Of(Event Player)) : Null, Custom String("{0} {1}: Desynced {2}",
  • Hero Icon String(Hero Of(Event Player)), Slot Of(Event Player), Icon String(Spiral)), Custom String(" "), Custom String(" "),
  • Left, Slot Of(Event Player), Color(Purple), Color(White), Color(White), Visible To and String, Visible Never);
  • }
  • }
  • disabled rule("----- Hero specific interactions -----")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • }
  • rule("[Baptiste] - Disallow jump when crouching")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • Baptiste;
  • }
  • conditions
  • {
  • Is Crouching(Event Player) == True;
  • Has Status(Event Player, Hacked) == False;
  • }
  • actions
  • {
  • Set Jump Enabled(Event Player, False);
  • Event Player.baptisteCrouching = True;
  • }
  • }
  • rule("[Baptiste] - Re-allow jump 1s after crouching")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • Baptiste;
  • }
  • conditions
  • {
  • Is Crouching(Event Player) == False;
  • }
  • actions
  • {
  • Wait(1, Abort When False);
  • Set Jump Enabled(Event Player, True);
  • Event Player.baptisteCrouching = False;
  • }
  • }
  • rule("[Baptiste] - Apply artificial jump when player presses jump during and 1s after crouching")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • Baptiste;
  • }
  • conditions
  • {
  • Is Button Held(Event Player, Button(Jump)) == True;
  • Event Player.baptisteCrouching == True;
  • Is On Ground(Event Player) == True;
  • }
  • actions
  • {
  • Apply Impulse(Event Player, Up, 5.720, To Player, Cancel Contrary Motion);
  • }
  • }
  • rule("[Move Speed] - Press ability 1 to speed up, but disallow primary/secondary/reload")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Is Button Held(Event Player, Button(Ability 1)) == True;
  • Is Moving(Event Player) == True;
  • Is Crouching(Event Player) == False;
  • }
  • actions
  • {
  • Set Move Speed(Event Player, 150);
  • Disallow Button(Event Player, Button(Primary Fire));
  • Disallow Button(Event Player, Button(Secondary Fire));
  • Disallow Button(Event Player, Button(Reload));
  • Set Status(Event Player, Null, Burning, 9999);
  • }
  • }
  • rule("[Move Speed] - Don't press ability 1 to go back to normal speed, allow primary/secondary/reload")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • (!Is Button Held(Event Player, Button(Ability 1)) || !Is Moving(Event Player) || Is Crouching(Event Player)) == True;
  • }
  • actions
  • {
  • Set Move Speed(Event Player, 100);
  • Wait(0.150, Abort When False);
  • Allow Button(Event Player, Button(Primary Fire));
  • Allow Button(Event Player, Button(Secondary Fire));
  • Allow Button(Event Player, Button(Reload));
  • Clear Status(Event Player, Burning);
  • }
  • }
  • disabled rule("----- Replay mechanics -----")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • }
  • rule("[Update] - Update frame count")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Global.gameIsRecording == True;
  • Is Game In Progress == True;
  • }
  • actions
  • {
  • Global.currentFrame += 1;
  • Wait(0.066, Abort When False);
  • Loop If Condition Is True;
  • }
  • }
  • rule("[Subroutine] - Reset recording")
  • {
  • event
  • {
  • Subroutine;
  • ResetRecording;
  • }
  • actions
  • {
  • Event Player.positionValues = Empty Array;
  • Event Player.positionFrame = Empty Array;
  • Event Player.directionValues = Empty Array;
  • Event Player.directionFrame = Empty Array;
  • Event Player.throttleValues = Empty Array;
  • Event Player.throttleFrame = Empty Array;
  • Event Player.jumpValues = Empty Array;
  • Event Player.jumpFrame = Empty Array;
  • Event Player.crouchValues = Empty Array;
  • Event Player.crouchFrame = Empty Array;
  • Event Player.primaryFireValues = Empty Array;
  • Event Player.primaryFireFrame = Empty Array;
  • Event Player.secondaryFireValues = Empty Array;
  • Event Player.secondaryFireFrame = Empty Array;
  • Event Player.reloadValues = Empty Array;
  • Event Player.reloadFrame = Empty Array;
  • Event Player.sprintValues = Empty Array;
  • Event Player.sprintFrame = Empty Array;
  • Event Player.clipActionValue = 0;
  • Event Player.clipThrottleValue = 0;
  • Event Player.clipIndices = Empty Array;
  • }
  • }
  • rule("[Subroutine] - Record Frame Primary Fire")
  • {
  • event
  • {
  • Subroutine;
  • RecordPrimaryFire;
  • }
  • actions
  • {
  • If(Is Button Held(Event Player, Button(Primary Fire)) != Last Of(Event Player.primaryFireValues));
  • Modify Player Variable(Event Player, primaryFireValues, Append To Array, Is Button Held(Event Player, Button(Primary Fire)));
  • Modify Player Variable(Event Player, primaryFireFrame, Append To Array, Global.currentFrame);
  • End;
  • }
  • }
  • rule("[Subroutine] - Record Frame Secondary Fire")
  • {
  • event
  • {
  • Subroutine;
  • RecordSecondaryFire;
  • }
  • actions
  • {
  • If(Is Button Held(Event Player, Button(Secondary Fire)) != Last Of(Event Player.secondaryFireValues));
  • Modify Player Variable(Event Player, secondaryFireValues, Append To Array, Is Button Held(Event Player, Button(Secondary Fire)));
  • Modify Player Variable(Event Player, secondaryFireFrame, Append To Array, Global.currentFrame);
  • End;
  • }
  • }
  • rule("[Subroutine] - Record Frame Jump")
  • {
  • event
  • {
  • Subroutine;
  • RecordJumping;
  • }
  • actions
  • {
  • If(Is Button Held(Event Player, Button(Jump)) != Last Of(Event Player.jumpValues));
  • Modify Player Variable(Event Player, jumpValues, Append To Array, Is Button Held(Event Player, Button(Jump)));
  • Modify Player Variable(Event Player, jumpFrame, Append To Array, Global.currentFrame);
  • End;
  • }
  • }
  • rule("[Subroutine] - Record Frame Crouch")
  • {
  • event
  • {
  • Subroutine;
  • RecordCrouching;
  • }
  • actions
  • {
  • If(Is Button Held(Event Player, Button(Crouch)) != Last Of(Event Player.crouchValues));
  • Modify Player Variable(Event Player, crouchValues, Append To Array, Is Button Held(Event Player, Button(Crouch)));
  • Modify Player Variable(Event Player, crouchFrame, Append To Array, Global.currentFrame);
  • End;
  • }
  • }
  • rule("[Subroutine] - Record Frame Reload")
  • {
  • event
  • {
  • Subroutine;
  • RecordReloading;
  • }
  • actions
  • {
  • "Temporary Fix"
  • If(Is Reloading(Event Player) != Last Of(Event Player.reloadValues));
  • Modify Player Variable(Event Player, reloadValues, Append To Array, Is Reloading(Event Player));
  • Modify Player Variable(Event Player, reloadFrame, Append To Array, Global.currentFrame);
  • End;
  • }
  • }
  • rule("[Subroutine] - Record Frame Sprint")
  • {
  • event
  • {
  • Subroutine;
  • RecordSprinting;
  • }
  • actions
  • {
  • If(Is Button Held(Event Player, Button(Ability 1)) != Last Of(Event Player.sprintValues));
  • Modify Player Variable(Event Player, sprintValues, Append To Array, Is Button Held(Event Player, Button(Ability 1)));
  • Modify Player Variable(Event Player, sprintFrame, Append To Array, Global.currentFrame);
  • End;
  • }
  • }
  • rule("[Subroutine] - Record Frame Throttle")
  • {
  • event
  • {
  • Subroutine;
  • RecordThrottle;
  • }
  • actions
  • {
  • If(Throttle Of(Event Player) != Last Of(Event Player.throttleValues));
  • Modify Player Variable(Event Player, throttleValues, Append To Array, Throttle Of(Event Player));
  • Modify Player Variable(Event Player, throttleFrame, Append To Array, Global.currentFrame);
  • End;
  • }
  • }
  • rule("[Subroutine] - Record Frame Direction")
  • {
  • event
  • {
  • Subroutine;
  • RecordDirection;
  • }
  • actions
  • {
  • If(Facing Direction Of(Event Player) != Last Of(Event Player.directionValues));
  • Modify Player Variable(Event Player, directionValues, Append To Array, Facing Direction Of(Event Player));
  • Modify Player Variable(Event Player, directionFrame, Append To Array, Global.currentFrame);
  • End;
  • }
  • }
  • rule("[Subroutine] - Record Frame Position")
  • {
  • event
  • {
  • Subroutine;
  • RecordPosition;
  • }
  • actions
  • {
  • If(Position Of(Event Player) != Last Of(Event Player.positionValues));
  • Modify Player Variable(Event Player, positionValues, Append To Array, Position Of(Event Player));
  • Modify Player Variable(Event Player, positionFrame, Append To Array, Global.currentFrame);
  • End;
  • }
  • }
  • rule("[Subroutine] - Record Frame")
  • {
  • event
  • {
  • Subroutine;
  • RecordFrame;
  • }
  • actions
  • {
  • Call Subroutine(RecordPrimaryFire);
  • Call Subroutine(RecordSecondaryFire);
  • Call Subroutine(RecordJumping);
  • Call Subroutine(RecordCrouching);
  • Call Subroutine(RecordReloading);
  • Call Subroutine(RecordSprinting);
  • Call Subroutine(RecordThrottle);
  • Call Subroutine(RecordDirection);
  • Call Subroutine(RecordPosition);
  • }
  • }
  • rule("[Update] - Update Recording")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Global.gameIsRecording == True;
  • Is Dummy Bot(Event Player) == False;
  • Global.loop < 3;
  • }
  • actions
  • {
  • Call Subroutine(RecordFrame);
  • Wait(0.066, Abort When False);
  • Loop If Condition Is True;
  • }
  • }
  • rule("[Subroutine] - Prepare replay - Copy data from player to bot (Put this on bots)")
  • {
  • event
  • {
  • Subroutine;
  • PrepareReplay;
  • }
  • actions
  • {
  • Event Player.positionValues = Players In Slot(0, Team Of(Event Player)).positionValues;
  • Event Player.positionFrame = Players In Slot(0, Team Of(Event Player)).positionFrame;
  • Event Player.directionValues = Players In Slot(0, Team Of(Event Player)).directionValues;
  • Event Player.directionFrame = Players In Slot(0, Team Of(Event Player)).directionFrame;
  • Event Player.throttleValues = Players In Slot(0, Team Of(Event Player)).throttleValues;
  • Event Player.throttleFrame = Players In Slot(0, Team Of(Event Player)).throttleFrame;
  • Event Player.jumpValues = Players In Slot(0, Team Of(Event Player)).jumpValues;
  • Event Player.jumpFrame = Players In Slot(0, Team Of(Event Player)).jumpFrame;
  • Event Player.crouchValues = Players In Slot(0, Team Of(Event Player)).crouchValues;
  • Event Player.crouchFrame = Players In Slot(0, Team Of(Event Player)).crouchFrame;
  • Event Player.primaryFireValues = Players In Slot(0, Team Of(Event Player)).primaryFireValues;
  • Event Player.primaryFireFrame = Players In Slot(0, Team Of(Event Player)).primaryFireFrame;
  • Event Player.secondaryFireValues = Players In Slot(0, Team Of(Event Player)).secondaryFireValues;
  • Event Player.secondaryFireFrame = Players In Slot(0, Team Of(Event Player)).secondaryFireFrame;
  • Event Player.reloadValues = Players In Slot(0, Team Of(Event Player)).reloadValues;
  • Event Player.reloadFrame = Players In Slot(0, Team Of(Event Player)).reloadFrame;
  • Event Player.sprintValues = Players In Slot(0, Team Of(Event Player)).sprintValues;
  • Event Player.sprintFrame = Players In Slot(0, Team Of(Event Player)).sprintFrame;
  • Event Player.clipActionValue = 0;
  • Event Player.clipThrottleValue = 0;
  • Event Player.clipIndices = Empty Array;
  • }
  • }
  • rule("[Subroutine] - Play Frame Primary Fire - (actionEnum: 0)")
  • {
  • event
  • {
  • Subroutine;
  • ReplayPrimaryFire;
  • }
  • actions
  • {
  • "Enum for actions processing"
  • Event Player.actionEnum = 0;
  • "If the action frame is not available, then abort running this rules."
  • If(Global.currentFrame != Event Player.primaryFireFrame[Event Player.clipIndices[Event Player.actionEnum]]);
  • Abort;
  • End;
  • "Set the current frame value for this particular action"
  • Event Player.clipActionValue = Event Player.primaryFireValues[Event Player.clipIndices[Event Player.actionEnum]];
  • "Hold buttons"
  • If(Event Player.clipActionValue == True && !Is Button Held(Event Player, Button(Primary Fire)));
  • Start Holding Button(Event Player, Button(Primary Fire));
  • Else If(Event Player.clipActionValue == False && Is Button Held(Event Player, Button(Primary Fire)));
  • Stop Holding Button(Event Player, Button(Primary Fire));
  • End;
  • "Increase action index count by 1"
  • Event Player.clipIndices[Event Player.actionEnum] += 1;
  • }
  • }
  • rule("[Subroutine] - Play Frame Secondary Fire - (actionEnum: 1)")
  • {
  • event
  • {
  • Subroutine;
  • ReplaySecondaryFire;
  • }
  • actions
  • {
  • "Enum for actions processing"
  • Event Player.actionEnum = 1;
  • "If the action frame is not available, then abort running this rules."
  • If(Global.currentFrame != Event Player.secondaryFireFrame[Event Player.clipIndices[Event Player.actionEnum]]);
  • Abort;
  • End;
  • "Set the current frame value for this particular action"
  • Event Player.clipActionValue = Event Player.secondaryFireValues[Event Player.clipIndices[Event Player.actionEnum]];
  • "Hold buttons"
  • If(Event Player.clipActionValue == True && !Is Button Held(Event Player, Button(Secondary Fire)));
  • Start Holding Button(Event Player, Button(Secondary Fire));
  • Else If(Event Player.clipActionValue == False && Is Button Held(Event Player, Button(Secondary Fire)));
  • Stop Holding Button(Event Player, Button(Secondary Fire));
  • End;
  • "Increase action index count by 1"
  • Event Player.clipIndices[Event Player.actionEnum] += 1;
  • }
  • }
  • rule("[Subroutine] - Play Frame Jump - (actionEnum: 2)")
  • {
  • event
  • {
  • Subroutine;
  • ReplayJumping;
  • }
  • actions
  • {
  • "Enum for actions processing"
  • Event Player.actionEnum = 2;
  • "If the action frame is not available, then abort running this rules."
  • If(Global.currentFrame != Event Player.jumpFrame[Event Player.clipIndices[Event Player.actionEnum]]);
  • Abort;
  • End;
  • "Set the current frame value for this particular action"
  • Event Player.clipActionValue = Event Player.jumpValues[Event Player.clipIndices[Event Player.actionEnum]];
  • "Hold buttons"
  • If(Event Player.clipActionValue == True && !Is Button Held(Event Player, Button(Jump)));
  • Start Holding Button(Event Player, Button(Jump));
  • Else If(Event Player.clipActionValue == False && Is Button Held(Event Player, Button(Jump)));
  • Stop Holding Button(Event Player, Button(Jump));
  • End;
  • "Increase action index count by 1"
  • Event Player.clipIndices[Event Player.actionEnum] += 1;
  • }
  • }
  • rule("[Subroutine] - Play Frame Crouch - (actionEnum: 3)")
  • {
  • event
  • {
  • Subroutine;
  • ReplayCrouching;
  • }
  • actions
  • {
  • "Enum for actions processing"
  • Event Player.actionEnum = 3;
  • "If the action frame is not available, then abort running this rules."
  • If(Global.currentFrame != Event Player.crouchFrame[Event Player.clipIndices[Event Player.actionEnum]]);
  • Abort;
  • End;
  • "Set the current frame value for this particular action"
  • Event Player.clipActionValue = Event Player.crouchValues[Event Player.clipIndices[Event Player.actionEnum]];
  • "Hold buttons"
  • If(Event Player.clipActionValue == True && !Is Button Held(Event Player, Button(Crouch)));
  • Start Holding Button(Event Player, Button(Crouch));
  • Else If(Event Player.clipActionValue == False && Is Button Held(Event Player, Button(Crouch)));
  • Stop Holding Button(Event Player, Button(Crouch));
  • End;
  • "Increase action index count by 1"
  • Event Player.clipIndices[Event Player.actionEnum] += 1;
  • }
  • }
  • rule("[Subroutine] - Play Frame Reload - (actionEnum: 4)")
  • {
  • event
  • {
  • Subroutine;
  • ReplayReloading;
  • }
  • actions
  • {
  • "Enum for actions processing"
  • Event Player.actionEnum = 4;
  • "If the action frame is not available, then abort running this rules."
  • If(Global.currentFrame != Event Player.reloadFrame[Event Player.clipIndices[Event Player.actionEnum]]);
  • Abort;
  • End;
  • "Set the current frame value for this particular action"
  • Event Player.clipActionValue = Event Player.reloadValues[Event Player.clipIndices[Event Player.actionEnum]];
  • "Hold buttons"
  • If(Event Player.clipActionValue == True && !Is Button Held(Event Player, Button(Reload)));
  • Start Holding Button(Event Player, Button(Reload));
  • Else If(Event Player.clipActionValue == False && Is Button Held(Event Player, Button(Reload)));
  • Stop Holding Button(Event Player, Button(Reload));
  • End;
  • "Increase action index count by 1"
  • Event Player.clipIndices[Event Player.actionEnum] += 1;
  • }
  • }
  • rule("[Subroutine] - Play Frame Sprint - (actionEnum: 5)")
  • {
  • event
  • {
  • Subroutine;
  • ReplaySprinting;
  • }
  • actions
  • {
  • "Enum for actions processing"
  • Event Player.actionEnum = 5;
  • "If the action frame is not available, then abort running this rules."
  • If(Global.currentFrame != Event Player.sprintFrame[Event Player.clipIndices[Event Player.actionEnum]]);
  • Abort;
  • End;
  • "Set the current frame value for this particular action"
  • Event Player.clipActionValue = Event Player.sprintValues[Event Player.clipIndices[Event Player.actionEnum]];
  • "Hold buttons"
  • If(Event Player.clipActionValue == True && !Is Button Held(Event Player, Button(Ability 1)));
  • Start Holding Button(Event Player, Button(Ability 1));
  • Else If(Event Player.clipActionValue == False && Is Button Held(Event Player, Button(Ability 1)));
  • Stop Holding Button(Event Player, Button(Ability 1));
  • End;
  • "Increase action index count by 1"
  • Event Player.clipIndices[Event Player.actionEnum] += 1;
  • }
  • }
  • rule("[Subroutine] - Play Frame Throttle - (actionEnum: 6)")
  • {
  • event
  • {
  • Subroutine;
  • ReplayThrottle;
  • }
  • actions
  • {
  • "Enum for actions processing"
  • Event Player.actionEnum = 6;
  • "If the action frame is not available, then abort running this rules."
  • If(Global.currentFrame != Event Player.throttleFrame[Event Player.clipIndices[Event Player.actionEnum]]);
  • Abort;
  • End;
  • "Set the current frame value for this particular action"
  • Event Player.clipThrottleValue = Event Player.throttleValues[Event Player.clipIndices[Event Player.actionEnum]];
  • "Hold buttons"
  • If(Event Player.clipThrottleValue != Vector(0, 0, 0) && Throttle Of(Event Player) == Vector(0, 0, 0));
  • Start Throttle In Direction(Event Player, Event Player.clipThrottleValue, 1, To Player, Replace existing throttle,
  • Direction and Magnitude);
  • Else If(Event Player.clipThrottleValue == Vector(0, 0, 0) && Throttle Of(Event Player) != Vector(0, 0, 0));
  • Stop Throttle In Direction(Event Player);
  • End;
  • "Increase action index count by 1"
  • Event Player.clipIndices[Event Player.actionEnum] += 1;
  • }
  • }
  • rule("[Subroutine] - Play Frame Direction - (actionEnum: 7)")
  • {
  • event
  • {
  • Subroutine;
  • ReplayDirection;
  • }
  • actions
  • {
  • "Enum for actions processing"
  • Event Player.actionEnum = 7;
  • "If the action frame is not available, then abort running this rules."
  • If(Global.currentFrame != Event Player.directionFrame[Event Player.clipIndices[Event Player.actionEnum]]);
  • Abort;
  • End;
  • "Set the current frame value for this particular action"
  • Event Player.clipActionValue = Event Player.directionValues[Event Player.clipIndices[Event Player.actionEnum]];
  • Set Facing(Event Player, Event Player.clipActionValue, To World);
  • "Increase action index count by 1"
  • Event Player.clipIndices[Event Player.actionEnum] += 1;
  • }
  • }
  • rule("[Subroutine] - Play Frame Position - (actionEnum: 8)")
  • {
  • event
  • {
  • Subroutine;
  • ReplayPosition;
  • }
  • actions
  • {
  • "Enum for actions processing"
  • Event Player.actionEnum = 8;
  • "If the action frame is not available, then abort running this rules."
  • If(Global.currentFrame != Event Player.positionFrame[Event Player.clipIndices[Event Player.actionEnum]]);
  • Abort;
  • End;
  • "Set the current frame value for this particular action"
  • Event Player.clipActionValue = Event Player.positionValues[Event Player.clipIndices[Event Player.actionEnum]];
  • "Distance check"
  • If(Distance Between(Position Of(Event Player), Event Player.clipActionValue) > 0.400);
  • Teleport(Event Player, Event Player.clipActionValue);
  • End;
  • "Increase action index count by 1"
  • Event Player.clipIndices[Event Player.actionEnum] += 1;
  • }
  • }
  • rule("[Subroutine] - Play Frame")
  • {
  • event
  • {
  • Subroutine;
  • ReplayFrame;
  • }
  • actions
  • {
  • Call Subroutine(ReplayPrimaryFire);
  • Call Subroutine(ReplaySecondaryFire);
  • Call Subroutine(ReplayJumping);
  • Call Subroutine(ReplayCrouching);
  • Call Subroutine(ReplayReloading);
  • Call Subroutine(ReplaySprinting);
  • Call Subroutine(ReplayThrottle);
  • Call Subroutine(ReplayDirection);
  • Call Subroutine(ReplayPosition);
  • }
  • }
  • rule("[Update] - Update Replaying")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Is Dummy Bot(Event Player) == True;
  • Global.gameIsRecording == True;
  • Global.loop > 1;
  • }
  • actions
  • {
  • Call Subroutine(ReplayFrame);
  • Wait(0.066, Abort When False);
  • Loop If Condition Is True;
  • }
  • }
  • disabled rule("----- Map Data -----")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • }
  • rule("Init map data for Castillo")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Current Map == Map(Castillo);
  • }
  • actions
  • {
  • "Index 0 for Team 1, Index 1 for Team 2"
  • Global.defaultStartingPosition = Array(Vector(-113.600, 32.600, 27.100), Vector(-100.900, 32.600, 91));
  • Global.defaultFacingDirection = Array(Vector(0.150, 0, 1), Vector(-0.150, 0, -1));
  • "Objective Position"
  • Global.objectivePosition = Vector(-108.600, 33.400, 59.300);
  • "Set health pack locations"
  • Global.constHealthPackLocation = Array(Vector(-75, 32, 52.900), Vector(-129.500, 34.400, 63.500), Vector(-81.100, 32.600, 79.800),
  • Vector(-90.500, 32.600, 30.700));
  • Global.currentHealthPackLocation = Global.constHealthPackLocation;
  • "Set intro camera position (Welcome to Quantum Clash)"
  • Global.introCameraPos = Vector(-55, 58, 75);
  • }
  • }
  • rule("Init map data for Black Forest")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • (Current Map == Map(Black Forest)) != (Current Map == Map(Black Forest Winter));
  • }
  • actions
  • {
  • "Index 0 for Team 1, Index 1 for Team 2"
  • Global.defaultStartingPosition = Array(Vector(10.800, 11.600, 23.700), Vector(10.800, 11.600, -13.700));
  • Global.defaultFacingDirection = Array(Vector(-0.900, 0, -0.400), Vector(-0.900, 0, 0.400));
  • "Objective Position"
  • Global.objectivePosition = Vector(-20.400, 12.100, 5);
  • "Set health pack locations"
  • Global.constHealthPackLocation = Array(Vector(8, 17, 5), Vector(8.300, 12.500, 5), Vector(-9.200, 13, -20), Vector(-9.200, 13,
  • 30));
  • Global.currentHealthPackLocation = Global.constHealthPackLocation;
  • "Set intro camera position (Welcome to Quantum Clash)"
  • Global.introCameraPos = Vector(-45, 19, 5);
  • }
  • }
  • rule("Init map data for Necropolis")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Current Map == Map(Necropolis);
  • }
  • actions
  • {
  • "Index 0 for Team 1, Index 1 for Team 2"
  • Global.defaultStartingPosition = Array(Vector(-28.500, 4.300, -25.300), Vector(-28.500, 4.300, 25.300));
  • Global.defaultFacingDirection = Array(Vector(0.800, 0, 0.600), Vector(0.800, 0, -0.600));
  • "Objective Position"
  • Global.objectivePosition = Vector(-9, 1.500, 0);
  • "Set health pack locations"
  • Global.constHealthPackLocation = Array(Vector(-32, 2, 0), Vector(1, 3, 21), Vector(1, 3, -21), Vector(4, -6, 0));
  • Global.currentHealthPackLocation = Global.constHealthPackLocation;
  • "Set intro camera position (Welcome to Quantum Clash)"
  • Global.introCameraPos = Vector(45, 9, 0);
  • }
  • }
  • rule("Init map data for Ecopoint Antarctica")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • (Current Map == Map(Ecopoint: Antarctica)) != (Current Map == Map(Ecopoint: Antarctica Winter));
  • }
  • actions
  • {
  • "Index 0 for Team 1, Index 1 for Team 2"
  • Global.defaultStartingPosition = Array(Vector(1.500, 7.400, 28.700), Vector(1.500, 7.400, -28.700));
  • Global.defaultFacingDirection = Array(Vector(-0.200, 0, -1), Vector(-0.200, 0, 1));
  • "Objective Position"
  • Global.objectivePosition = Vector(8, 5, 0);
  • "Set health pack locations"
  • Global.constHealthPackLocation = Array(Vector(-19.800, 7, 0), Vector(22.900, 6, -18.300), Vector(22.900, 6, 18.300), Vector(-9.500,
  • 6.700, -11.700), Vector(-9.500, 6.700, 11.700));
  • Global.currentHealthPackLocation = Global.constHealthPackLocation;
  • "Set intro camera position (Welcome to Quantum Clash)"
  • Global.introCameraPos = Vector(-5, 22, 30);
  • }
  • }
  • rule("Init map data for Illos Ruins")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Current Map == Map(Ilios Ruins);
  • }
  • actions
  • {
  • "Index 0 for Team 1, Index 1 for Team 2"
  • Global.defaultStartingPosition = Array(Vector(-3.500, 60.400, -157.200), Vector(60.300, 60.400, -157.200));
  • Global.defaultFacingDirection = Array(Vector(1, 0, 0), Vector(-1, 0, 0));
  • "Objective Position"
  • Global.objectivePosition = Vector(28.400, 57.400, -157.300);
  • "Set health pack locations"
  • Global.constHealthPackLocation = Array(Vector(45.300, 60.400, -142.900), Vector(11.700, 60.400, -142.900), Vector(8.500, 60.400,
  • -172.900), Vector(48.500, 60.400, -172.900));
  • Global.currentHealthPackLocation = Global.constHealthPackLocation;
  • "Set intro camera position (Welcome to Quantum Clash)"
  • Global.introCameraPos = Vector(28.400, 78, -179.800);
  • }
  • }
Join the Workshop.codes Discord