Create
Return to post

Comparing difference between and

View raw
  • variables
  • {
  • global:
  • 0: MeleeINT
  • 1: Wipe
  • 2: WipeINT
  • player:
  • 0: menacingSpots
  • 1: menacingStartSpots
  • 2: menacingAge
  • 3: counter
  • 4: indexPosition
  • 5: randOffset
  • 7: Streak
  • 8: MaxStreak
  • }
  • rule("Init global")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • actions
  • {
  • Global.MeleeINT = Workshop Setting Real(Custom String("GENERAL"), Custom String("MELEE INTERVAL"), 0.100, 0.017, 1);
  • Global.Wipe = Workshop Setting Toggle(Custom String("GENERAL"), Custom String("SCORE AND STREAK WIPE EVERY 4 MIN"), True);
  • Global.WipeINT = Workshop Setting Integer(Custom String("GENERAL"), Custom String("WIPE INTERVAL"), 300, 60, 1000);
  • Create HUD Text(All Players(All Teams), Null, Null, Custom String("CODE {0} NTQA2", Ability Icon String(Hero(Doomfist), Button(
  • Ultimate))), Left, 0, White, White, White, Visible To and String, Default Visibility);
  • Disable Inspector Recording;
  • Disable Built-In Game Mode Completion;
  • Disable Built-In Game Mode Announcer;
  • Create HUD Text(Count Of(Filtered Array(All Players(All Teams), Current Array Element.MaxStreak > 0)) > 0 ? All Players(All Teams)
  • : Null, Null, Custom String(" \r\n"), Custom String("HIGHEST STREAKS"), Left, 0.500, White, White, Yellow,
  • Visible To and String, Default Visibility);
  • Create HUD Text(Count Of(Filtered Array(All Players(All Teams), Current Array Element.MaxStreak > 0)) > 0 ? All Players(All Teams)
  • : Null, Sorted Array(All Players(All Teams), Current Array Element.MaxStreak * -1)[0].MaxStreak, Null, Custom String("{0} {1}",
  • Hero Icon String(Hero Of(Sorted Array(All Players(All Teams), Current Array Element.MaxStreak * -1)[0])), Sorted Array(
  • All Players(All Teams), Current Array Element.MaxStreak * -1)[0]), Left, 1, White, White, White, Visible To and String,
  • Default Visibility);
  • Create HUD Text(Count Of(Filtered Array(All Players(All Teams), Current Array Element.MaxStreak > 0)) > 1 ? All Players(All Teams)
  • : Null, Sorted Array(All Players(All Teams), Current Array Element.MaxStreak * -1)[1].MaxStreak, Null, Custom String("{0} {1}",
  • Hero Icon String(Hero Of(Sorted Array(All Players(All Teams), Current Array Element.MaxStreak * -1)[1])), Sorted Array(
  • All Players(All Teams), Current Array Element.MaxStreak * -1)[1]), Left, 2, White, White, White, Visible To and String,
  • Default Visibility);
  • Create HUD Text(Count Of(Filtered Array(All Players(All Teams), Current Array Element.MaxStreak > 0)) > 2 ? All Players(All Teams)
  • : Null, Sorted Array(All Players(All Teams), Current Array Element.MaxStreak * -1)[2].MaxStreak, Null, Custom String("{0} {1}",
  • Hero Icon String(Hero Of(Sorted Array(All Players(All Teams), Current Array Element.MaxStreak * -1)[2])), Sorted Array(
  • All Players(All Teams), Current Array Element.MaxStreak * -1)[2]), Left, 3, White, White, White, Visible To and String,
  • Default Visibility);
  • }
  • }
  • rule("Init each")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • actions
  • {
  • Set Primary Fire Enabled(Event Player, False);
  • Set Ultimate Ability Enabled(Event Player, False);
  • Set Objective Description(Event Player, Custom String("HOLD {1} TO PUNCH, HOLD {0} TO CHANGE HERO", Input Binding String(Button(
  • Interact)), Input Binding String(Button(Primary Fire))), Visible To and String);
  • Create HUD Text(Event Player, Null, Custom String(" \r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n"), Custom String(
  • " \r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n"), Top, 1, White, White, White, Visible To and String, Default Visibility);
  • Create HUD Text(Event Player, Null, Custom String(" \r\n\r\n\r\n\r\n"), Custom String(" \r\n\r\n\r\n\r\n"), Top, 1, White, White,
  • White, Visible To and String, Default Visibility);
  • Create HUD Text(Event Player.Streak > 0 ? Event Player : Null, Event Player.Streak, Custom String("PUNCH STREAK"), Custom String(
  • "HIGH SCORE: {0}", Event Player.MaxStreak), Top, 2, White, White, White, Visible To and String, Default Visibility);
  • }
  • }
  • rule("Skip assemble")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Is Assembling Heroes == True;
  • }
  • actions
  • {
  • Set Match Time(7);
  • Wait(8, Ignore Condition);
  • Set Match Time(Global.WipeINT);
  • }
  • }
  • rule("Menacing 1")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • actions
  • {
  • "open up a spot if 10 shells already exit on the field"
  • If(Count Of(Filtered Array(Event Player.menacingSpots, Current Array Element != Null && True)) >= 8);
  • Event Player.menacingSpots[Index Of Array Value(Event Player.menacingSpots, First Of(Filtered Array(Sorted Array(
  • Event Player.menacingSpots, Event Player.menacingAge[Index Of Array Value(Event Player.menacingSpots, Current Array Element)]),
  • Current Array Element != Null)))] = Null;
  • End;
  • Event Player.randOffset = 1.500 * Normalize(Vector(Random Real(0, 1), 0, Random Real(0, 1)));
  • If(Filtered Array(Event Player.menacingSpots, Current Array Element == Null) != Empty Array);
  • Event Player.indexPosition = Index Of Array Value(Event Player.menacingSpots, Null);
  • Event Player.menacingSpots[Event Player.indexPosition] = Eye Position(Event Player) + Vector(0, -2, 0) + Event Player.randOffset;
  • Event Player.menacingStartSpots[Event Player.indexPosition] = Eye Position(Event Player) + Vector(0, -2, 0)
  • + Event Player.randOffset;
  • Event Player.menacingAge[Event Player.indexPosition] = Total Time Elapsed;
  • Else;
  • Modify Player Variable(Event Player, menacingSpots, Append To Array, Eye Position(Event Player) + Vector(0, -2, 0)
  • + Event Player.randOffset);
  • Modify Player Variable(Event Player, menacingStartSpots, Append To Array, Eye Position(Event Player) + Vector(0, -2, 0)
  • + Event Player.randOffset);
  • Modify Player Variable(Event Player, menacingAge, Append To Array, Total Time Elapsed);
  • End;
  • Wait(0.200, Ignore Condition);
  • Loop;
  • }
  • }
  • rule("Menacing 2")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • actions
  • {
  • Create In-World Text(All Players(All Teams), Custom String("ゴ"), Event Player.menacingSpots[0], Random Real(1, 3),
  • Clip Against Surfaces, Visible To Position and String, Purple, Default Visibility);
  • Create In-World Text(All Players(All Teams), Custom String("ゴ"), Event Player.menacingSpots[1], Random Real(1, 3),
  • Clip Against Surfaces, Visible To Position and String, Purple, Default Visibility);
  • Create In-World Text(All Players(All Teams), Custom String("ゴ"), Event Player.menacingSpots[2], Random Real(1, 3),
  • Clip Against Surfaces, Visible To Position and String, Purple, Default Visibility);
  • Create In-World Text(All Players(All Teams), Custom String("ゴ"), Event Player.menacingSpots[3], Random Real(1, 3),
  • Clip Against Surfaces, Visible To Position and String, Purple, Default Visibility);
  • }
  • }
  • rule("Menacing 3")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • actions
  • {
  • For Player Variable(Event Player, counter, 0, Count Of(Event Player.menacingSpots), 1);
  • Event Player.menacingSpots[Event Player.counter] += Vector(0, 0.031 * 1, 0);
  • If(Distance Between(Event Player.menacingSpots[Event Player.counter], Event Player.menacingStartSpots[Event Player.counter]) >= 5);
  • Event Player.menacingSpots[Event Player.counter] = Null;
  • Event Player.menacingStartSpots[Event Player.counter] = Null;
  • End;
  • End;
  • Wait(0.016, Ignore Condition);
  • Loop;
  • }
  • }
  • rule("Change")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Is Button Held(Event Player, Interact) == True;
  • }
  • actions
  • {
  • Cancel Primary Action(Event Player);
  • Wait(0.200, Abort When False);
  • Set Player Allowed Heroes(Event Player, Remove From Array(All Heroes, Hero Of(Event Player)));
  • Wait(0.016, Ignore Condition);
  • Reset Player Hero Availability(Event Player);
  • }
  • }
  • rule("Punch")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Is Meleeing(Event Player) == True;
  • }
  • actions
  • {
  • Wait(0.016, Ignore Condition);
  • Cancel Primary Action(Event Player);
  • Set Status(Event Player, Null, Knocked Down, 0.001);
  • Set Ability Cooldown(Event Player, Button(Melee), 0);
  • Loop If Condition Is True;
  • }
  • }
  • rule("Killed")
  • {
  • event
  • {
  • Player Dealt Final Blow;
  • All;
  • All;
  • }
  • actions
  • {
  • Start Heal Over Time(Event Player, Event Player, 1, 600);
  • Set Status(Event Player, Null, Burning, 1);
  • Communicate(Event Player, Goodbye);
  • }
  • }
  • rule("Reload")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Is Button Held(Event Player, Reload) == True;
  • }
  • actions
  • {
  • Set Ammo(Event Player, 0, 0);
  • Set Ammo(Event Player, 1, 0);
  • }
  • }
  • rule("Spam")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Is Button Held(Event Player, Primary Fire) == True;
  • }
  • actions
  • {
  • Press Button(Event Player, Melee);
  • Wait(0.100, Abort When False);
  • Wait(Global.MeleeINT, Abort When False);
  • Loop If Condition Is True;
  • }
  • }
  • rule("D.Va health")
  • rule("Streak")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • Player Dealt Damage;
  • All;
  • All;
  • D.Va;
  • }
  • conditions
  • {
  • Is In Alternate Form(Event Player) == True;
  • Event Ability == Button(Melee);
  • }
  • actions
  • {
  • Add Health Pool To Player(Event Player, Health, 100, False, False);
  • Event Player.Streak += 1;
  • Skip If(Event Player.Streak <= Event Player.MaxStreak, 2);
  • Event Player.MaxStreak = Event Player.Streak;
  • Play Effect(Event Player, Buff Explosion Sound, White, Event Player, 18);
  • Wait(2.500, Restart When True);
  • Event Player.Streak = 0;
  • }
  • }
  • rule("Time")
  • rule("Wipe")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Match Time <= 61;
  • Is Assembling Heroes == False;
  • Global.Wipe == True;
  • Match Time <= 10;
  • }
  • actions
  • {
  • Set Match Time(3599);
  • Big Message(All Players(All Teams), Custom String("------------- SCORE WIPE IN 10 SECONDS -------------"));
  • Wait(10, Ignore Condition);
  • Play Effect(All Players(All Teams), Ring Explosion Sound, White, Vector(0, 0, 0), 70);
  • Play Effect(All Players(All Teams), Ring Explosion, White, Vector(0, 0, 0), 80);
  • All Players(All Teams).Streak = 0;
  • All Players(All Teams).MaxStreak = 0;
  • Set Player Score(All Players(All Teams), 0);
  • Set Match Time(Global.WipeINT);
  • }
  • }
  • rule("Streak")
  • rule("Quick rez")
  • {
  • event
  • {
  • Player Dealt Damage;
  • Player Died;
  • All;
  • All;
  • }
  • conditions
  • {
  • Event Ability == Button(Melee);
  • }
  • actions
  • {
  • Event Player.Streak += 1;
  • Skip If(Event Player.Streak <= Event Player.MaxStreak, 2);
  • Event Player.MaxStreak = Event Player.Streak;
  • Play Effect(Event Player, Buff Explosion Sound, White, Event Player, 15);
  • Wait(2.500, Restart When True);
  • Event Player.Streak = 0;
  • Play Effect(Event Player, Explosion Sound, White, Event Player, 15);
  • Wait(0.750, Ignore Condition);
  • Teleport(Event Player, Vector(Random Real(-13, 13), Random Real(0, 5), Random Real(-13, 13)));
  • Resurrect(Event Player);
  • Play Effect(All Players(All Teams), Ring Explosion, Purple, Position Of(Event Player), 6);
  • Play Effect(All Players(All Teams), Explosion Sound, White, Position Of(Event Player), 45);
  • }
  • }
Join the Workshop.codes Discord