Create
Return to post

Comparing difference between and

View raw
  • variables
  • {
  • global:
  • 0: pregame
  • 1: playersReady
  • 2: timer
  • 20: Disconnect
  • 21: DcSlot
  • 22: DcTeam
  • 23: UltChargeLoop
  • 24: UltChargeTable
  • player:
  • 0: buttonPress
  • }
  • disabled rule("debug")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Is Button Held(Host Player, Interact) == True;
  • }
  • actions
  • {
  • Set Match Time(10);
  • }
  • }
  • disabled rule("debug 2")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • actions
  • {
  • Destroy All HUD Text;
  • Create HUD Text(All Players(All Teams), Custom String("{0} | {1}", Match Time, Is Waiting For Players), Custom String("{0}",
  • Payload Progress Percentage), Null, Top, 0, White, White, White, Visible To and String, Default Visibility);
  • Wait(0.100, Ignore Condition);
  • Loop;
  • }
  • }
  • rule("player ready")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Global.pregame == 0;
  • Event Player.buttonPress == 0;
  • Is Button Held(Event Player, Ultimate) == True;
  • Is Waiting For Players == False;
  • Global.timer == 1;
  • }
  • actions
  • {
  • Event Player.buttonPress = 1;
  • Wait(0.100, Ignore Condition);
  • Loop If(Is Button Held(Event Player, Ultimate) == True);
  • Global.playersReady += 1;
  • Global.D = 1;
  • Wait(0.100, Ignore Condition);
  • Event Player.buttonPress = 2;
  • }
  • }
  • rule("player deready")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Global.pregame == 0;
  • Event Player.buttonPress == 2;
  • Is Button Held(Event Player, Ultimate) == True;
  • }
  • actions
  • {
  • Event Player.buttonPress = 1;
  • Wait(0.100, Ignore Condition);
  • Loop If(Is Button Held(Event Player, Ultimate) == True);
  • Global.playersReady -= 1;
  • Global.D = 1;
  • Wait(0.100, Ignore Condition);
  • Event Player.buttonPress = 0;
  • }
  • }
  • rule("ready hud")
  • {
  • event
  • {
  • Subroutine;
  • Sub0;
  • }
  • actions
  • {
  • Destroy HUD Text(Last Text ID);
  • If(Event Player.buttonPress == 2);
  • Create HUD Text(Event Player, Custom String("Ready"), Null, Custom String("{0}/12 Ready", Global.playersReady), Right, 0, Green,
  • White, White, Visible To and String, Default Visibility);
  • Else;
  • Create HUD Text(Event Player, Custom String("Not Ready"), Null, Custom String("{0}/12 Ready", Global.playersReady), Right, 0, Red,
  • White, White, Visible To and String, Default Visibility);
  • }
  • }
  • rule("ready hud activation")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Is Waiting For Players == False;
  • Is Waiting For Players == 0;
  • Global.pregame == 0;
  • Global.D == 1;
  • }
  • actions
  • {
  • Global.D = 0;
  • Wait(0.200, Ignore Condition);
  • Call Subroutine(Sub0);
  • }
  • }
  • rule("destroy hud")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Is Game In Progress == True;
  • }
  • actions
  • {
  • Destroy All HUD Text;
  • }
  • }
  • rule("host timer loop activation")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Is Waiting For Players == False;
  • Global.pregame == 0;
  • Is Button Held(Host Player, Interact) == True;
  • Global.timer == 0;
  • }
  • actions
  • {
  • Global.timer = 1;
  • Call Subroutine(Sub0);
  • }
  • }
  • rule("timer loop")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Global.timer == 1;
  • Global.pregame == 0;
  • Is Game In Progress == False;
  • }
  • actions
  • {
  • Set Match Time(41);
  • Wait(0.900, Ignore Condition);
  • Loop If(Global.pregame == 0);
  • }
  • }
  • rule("start game")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Global.playersReady == 12;
  • }
  • actions
  • {
  • Wait(5, Ignore Condition);
  • Abort If(Global.playersReady != 12);
  • Global.pregame = 1;
  • Destroy All HUD Text;
  • }
  • }
  • rule("prevent game end payload")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • (Payload Progress Percentage != 100 && Match Time != 0) == True;
  • Current Game Mode == Game Mode(Escort);
  • }
  • actions
  • {
  • Disable Built-In Game Mode Completion;
  • Wait(0.010, Ignore Condition);
  • Loop If(Payload Progress Percentage != 100 && Match Time != 0);
  • Enable Built-In Game Mode Completion;
  • }
  • }
  • rule("prevent game end assault")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • (Point Capture Percentage != 100 && Match Time != 0) == True;
  • Current Game Mode == Game Mode(Assault);
  • }
  • actions
  • {
  • Disable Built-In Game Mode Completion;
  • Wait(0.010, Ignore Condition);
  • Loop If(Point Capture Percentage != 100 && Match Time != 0);
  • Enable Built-In Game Mode Completion;
  • }
  • }
  • rule("game end control")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Current Game Mode == Game Mode(Control);
  • Team Score(Team 1) + Team Score(Team 2) == 3;
  • }
  • actions
  • {
  • If(Team Score(Team 1) > Team Score(Team 2));
  • Declare Team Victory(Team 1);
  • Else If(Team Score(Team 2) > Team Score(Team 1));
  • Declare Team Victory(Team 2);
  • }
  • }
  • rule("prevent game end hybrid")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Current Game Mode == Game Mode(Hybrid);
  • (Point Capture Percentage != 100 && Match Time != 0) == True;
  • }
  • actions
  • {
  • Disable Built-In Game Mode Completion;
  • Wait(0.010, Ignore Condition);
  • Loop If(Point Capture Percentage != 100 && Match Time != 0);
  • Enable Built-In Game Mode Completion;
  • }
  • }
  • rule("prevent game end hybrid 2")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Current Game Mode == Game Mode(Hybrid);
  • (Payload Progress Percentage != 100 && Match Time != 0) == True;
  • }
  • actions
  • {
  • Disable Built-In Game Mode Completion;
  • Wait(0.010, Ignore Condition);
  • Loop If(Payload Progress Percentage != 100 && Match Time != 0);
  • Enable Built-In Game Mode Completion;
  • }
  • }
  • disabled rule("Ultimate Charge on Disconnect (code copied directly from easyScrims by MrPig100 and MrMoustachioo)")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • }
  • disabled rule("=> realize any DC")
  • {
  • event
  • {
  • Player Left Match;
  • All;
  • All;
  • }
  • conditions
  • {
  • Is Game In Progress == True;
  • }
  • actions
  • {
  • Global.Disconnect[1] = True;
  • }
  • }
  • disabled rule("=> identify dc'd player")
  • {
  • event
  • {
  • Player Joined Match;
  • All;
  • All;
  • }
  • conditions
  • {
  • Is Game In Progress == True;
  • }
  • actions
  • {
  • Global.DcSlot = Slot Of(Event Player);
  • Global.DcTeam = Team Of(Event Player);
  • Global.Disconnect[2] = True;
  • }
  • }
  • disabled rule("=> set ult charge of last dc'd player all Teams")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Global.Disconnect[1] == True;
  • Global.Disconnect[2] == True;
  • Hero Of(Players In Slot(Global.DcSlot, Global.DcTeam)) != False;
  • }
  • actions
  • {
  • Skip If(Global.DcTeam == Team 2, 2);
  • Set Ultimate Charge(Players In Slot(Global.DcSlot, Global.DcTeam), Global.UltChargeTable[Global.DcSlot]);
  • Skip(1);
  • Set Ultimate Charge(Players In Slot(Global.DcSlot, Global.DcTeam), Global.UltChargeTable[Global.DcSlot + 6]);
  • Wait(0.250, Ignore Condition);
  • Global.Disconnect[1] = 0;
  • Global.Disconnect[2] = 0;
  • Global.DcSlot = 0;
  • Global.DcTeam = 0;
  • }
  • }
  • disabled rule("=> 1st block short ult charge gather")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Global.UltChargeLoop > 3;
  • Global.Disconnect[1] == 0;
  • }
  • actions
  • {
  • Global.UltChargeTable[0] = Ultimate Charge Percent(Players In Slot(0, Team 1));
  • Global.UltChargeTable[1] = Ultimate Charge Percent(Players In Slot(1, Team 1));
  • Global.UltChargeTable[2] = Ultimate Charge Percent(Players In Slot(2, Team 1));
  • Chase Global Variable Over Time(UltChargeLoop, 0, 4, Destination and Duration);
  • }
  • }
  • disabled rule("=> 2nd block short ult charge gather")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Global.UltChargeLoop > 2;
  • Global.Disconnect[1] == 0;
  • }
  • actions
  • {
  • Global.UltChargeTable[3] = Ultimate Charge Percent(Players In Slot(3, Team 1));
  • Global.UltChargeTable[4] = Ultimate Charge Percent(Players In Slot(4, Team 1));
  • Global.UltChargeTable[5] = Ultimate Charge Percent(Players In Slot(5, Team 1));
  • }
  • }
  • disabled rule("=> 3rd block short ult charge gather")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Global.UltChargeLoop > 1;
  • Global.Disconnect[1] == 0;
  • }
  • actions
  • {
  • Global.UltChargeTable[6] = Ultimate Charge Percent(Players In Slot(0, Team 2));
  • Global.UltChargeTable[7] = Ultimate Charge Percent(Players In Slot(1, Team 2));
  • Global.UltChargeTable[8] = Ultimate Charge Percent(Players In Slot(2, Team 2));
  • }
  • }
  • disabled rule("=> 4th block and loop short ult charge gather")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Global.UltChargeLoop == 0;
  • Global.Disconnect[1] == 0;
  • }
  • actions
  • {
  • Global.UltChargeTable[9] = Ultimate Charge Percent(Players In Slot(3, Team 2));
  • Global.UltChargeTable[10] = Ultimate Charge Percent(Players In Slot(4, Team 2));
  • Global.UltChargeTable[11] = Ultimate Charge Percent(Players In Slot(5, Team 2));
  • Global.UltChargeLoop = 4;
  • }
  • }
Join the Workshop.codes Discord