Gun Game | Keep HP and Ult % | Ult to skip

NGFPW

Join my discord.gg/ZdukXgB

Gun Game/Hero Gauntlet where you play from DVA to Zen. Kill or play the ultimate to swap to the next hero. You keep % of health and ultimate when you swap. Suicides are punished - Jokaes#2263

Gun Game / Hero Gauntlet

Features

  • You go from DVA to Zenyatta.
  • You keep the % of health and ultimate charge when you get an elimination and switch to the next hero.
  • You can get an elimination killing a hero or using the ultimate.
  • Effects to make the transition between hero more visible (white if it's for a final blow and yellow if it's for the ultimate).
  • A hero icon in the head of a hero to show in which is transitioning.
  • The ultimate in this mode doesn't work as always instead you gain an elimination and swap to the next hero in the list.
  • Suicides are punished. You lose 1 elimination, all your ultimate charge and return to the previous hero.
  • The game starts immediately and when it finishes it restarts on a new map.
  • Time goes up instead of down.
  • HUD showing your next five heroes.

  • HUD showing your actual swap.

  • The default list is "DVA to Zen" but you can change it if you want

Code Snippet

settings { main { Description: "Gun Game | Keep HP and Ult % | Ult to skip. Kill or play the ultimate to skip to the next hero. You keep % of health and ultimate when you swap. Suicides are punished. HUD and effects improvements. v5.4.0 -Jokaes#2263 Updated code & more: jokaes.github.io" } lobby { Map Rotation: After A Game Max Spectators: 12 Return To Lobby: Never } modes { Deathmatch { disabled maps { Black Forest Blizzard World Château Guillard Ecopoint: Antarctica Eichenwalde Hanamura Hollywood King's Row Lijiang Control Center Lijiang Garden Lijiang Night Market } } General { Game Mode Start: Immediately Respawn As Random Hero: On Score To Win: 32 } } } variables { global: 1: heroList 2: timeCounter player: 1: desiredHero 2: hudHeroVisibility 3: leaderIcon 4: actualNormalizedHealth 5: actualUltPercent } rule("-------START-------") { event { Ongoing - Global; } } rule("\"Start game\" message") { event { Ongoing - Global; } actions { Skip If(Not(Is Waiting For Players), 3); Big Message(All Players(All Teams), String("{0} {1}", String("Start", Null, Null, Null), String("Game", Null, Null, Null), Null)); Wait(5, Ignore Condition); Loop; } } rule("Skip assembling heroes time") { event { Ongoing - Global; } conditions { Is Assembling Heroes == True; } actions { Set Match Time(0); } } rule("Force start with first hero and disallow default ult") { event { Ongoing - Each Player; All; All; } conditions { Is Game In Progress == True; } actions { Set Player Variable(Event Player, desiredHero, 0); Disallow Button(Event Player, Ultimate); } } rule("Time counter - Initialize new time") { event { Ongoing - Global; } conditions { Is Game In Progress == True; } actions { Pause Match Time; Set Global Variable(timeCounter, 0.001); Disable Built-In Game Mode Announcer; Disable Built-In Game Mode Music; Set Match Time(Global Variable(timeCounter)); } } rule("Time counter - Add second") { event { Ongoing - Global; } conditions { Is Game In Progress == True; Compare(Count Of(All Players(All Teams)), >, 1) == True; } actions { Set Match Time(Global Variable(timeCounter)); Modify Global Variable(timeCounter, Add, 1); Wait(1, Ignore Condition); Loop If Condition Is True; } } rule("Time counter - Reenable announcer and music") { event { Ongoing - Global; } conditions { Is Game In Progress == True; Global Variable(timeCounter) >= 61; } actions { Enable Built-In Game Mode Announcer; Enable Built-In Game Mode Music; } } rule("-------HERO LIST-------") { event { Ongoing - Global; } } rule("Hero List {D.va to Zen - Hero Selection Order} --Default") { event { Ongoing - Global; } actions { Set Global Variable(heroList, Hero(D.Va)); Modify Global Variable(heroList, Append To Array, Hero(Orisa)); Modify Global Variable(heroList, Append To Array, Hero(Reinhardt)); Modify Global Variable(heroList, Append To Array, Hero(Roadhog)); Modify Global Variable(heroList, Append To Array, Hero(Sigma)); Modify Global Variable(heroList, Append To Array, Hero(Winston)); Modify Global Variable(heroList, Append To Array, Hero(Wrecking Ball)); Modify Global Variable(heroList, Append To Array, Hero(Zarya)); Modify Global Variable(heroList, Append To Array, Hero(Ashe)); Modify Global Variable(heroList, Append To Array, Hero(Bastion)); Modify Global Variable(heroList, Append To Array, Hero(Doomfist)); Modify Global Variable(heroList, Append To Array, Hero(Echo)); Modify Global Variable(heroList, Append To Array, Hero(Genji)); Modify Global Variable(heroList, Append To Array, Hero(Hanzo)); Modify Global Variable(heroList, Append To Array, Hero(Junkrat)); Modify Global Variable(heroList, Append To Array, Hero(McCree)); Modify Global Variable(heroList, Append To Array, Hero(Mei)); Modify Global Variable(heroList, Append To Array, Hero(Pharah)); Modify Global Variable(heroList, Append To Array, Hero(Reaper)); Modify Global Variable(heroList, Append To Array, Hero(Soldier: 76)); Modify Global Variable(heroList, Append To Array, Hero(Sombra)); Modify Global Variable(heroList, Append To Array, Hero(Symmetra)); Modify Global Variable(heroList, Append To Array, Hero(Torbjörn)); Modify Global Variable(heroList, Append To Array, Hero(Tracer)); Modify Global Variable(heroList, Append To Array, Hero(Widowmaker)); Modify Global Variable(heroList, Append To Array, Hero(Ana)); Modify Global Variable(heroList, Append To Array, Hero(Baptiste)); Modify Global Variable(heroList, Append To Array, Hero(Brigitte)); Modify Global Variable(heroList, Append To Array, Hero(Lúcio)); Modify Global Variable(heroList, Append To Array, Hero(Mercy)); Modify Global Variable(heroList, Append To Array, Hero(Moira)); Modify Global Variable(heroList, Append To Array, Hero(Zenyatta)); } } disabled rule("Hero List {Ana to Zen - Alphabetic Order}") { event { Ongoing - Global; } actions { Set Global Variable(heroList, Hero(Ana)); Modify Global Variable(heroList, Append To Array, Hero(Ashe)); Modify Global Variable(heroList, Append To Array, Hero(Baptiste)); Modify Global Variable(heroList, Append To Array, Hero(Bastion)); Modify Global Variable(heroList, Append To Array, Hero(Brigitte)); Modify Global Variable(heroList, Append To Array, Hero(D.Va)); Modify Global Variable(heroList, Append To Array, Hero(Doomfist)); Modify Global Variable(heroList, Append To Array, Hero(Genji)); Modify Global Variable(heroList, Append To Array, Hero(Hanzo)); Modify Global Variable(heroList, Append To Array, Hero(Junkrat)); Modify Global Variable(heroList, Append To Array, Hero(Lúcio)); Modify Global Variable(heroList, Append To Array, Hero(McCree)); Modify Global Variable(heroList, Append To Array, Hero(Mei)); Modify Global Variable(heroList, Append To Array, Hero(Mercy)); Modify Global Variable(heroList, Append To Array, Hero(Moira)); Modify Global Variable(heroList, Append To Array, Hero(Orisa)); Modify Global Variable(heroList, Append To Array, Hero(Pharah)); Modify Global Variable(heroList, Append To Array, Hero(Reaper)); Modify Global Variable(heroList, Append To Array, Hero(Reinhardt)); Modify Global Variable(heroList, Append To Array, Hero(Roadhog)); Modify Global Variable(heroList, Append To Array, Hero(Soldier: 76)); Modify Global Variable(heroList, Append To Array, Hero(Sombra)); Modify Global Variable(heroList, Append To Array, Hero(Symmetra)); Modify Global Variable(heroList, Append To Array, Hero(Torbjörn)); Modify Global Variable(heroList, Append To Array, Hero(Tracer)); Modify Global Variable(heroList, Append To Array, Hero(Widowmaker)); Modify Global Variable(heroList, Append To Array, Hero(Winston)); Modify Global Variable(heroList, Append To Array, Hero(Wrecking Ball)); Modify Global Variable(heroList, Append To Array, Hero(Zarya)); Modify Global Variable(heroList, Append To Array, Hero(Zenyatta)); } } disabled rule("Hero List {All heroes in Random Order}") { event { Ongoing - Global; } actions { Set Global Variable(heroList, Hero(D.Va)); Modify Global Variable(heroList, Append To Array, Hero(Orisa)); Modify Global Variable(heroList, Append To Array, Hero(Reinhardt)); Modify Global Variable(heroList, Append To Array, Hero(Roadhog)); Modify Global Variable(heroList, Append To Array, Hero(Winston)); Modify Global Variable(heroList, Append To Array, Hero(Wrecking Ball)); Modify Global Variable(heroList, Append To Array, Hero(Zarya)); Modify Global Variable(heroList, Append To Array, Hero(Ashe)); Modify Global Variable(heroList, Append To Array, Hero(Bastion)); Modify Global Variable(heroList, Append To Array, Hero(Doomfist)); Modify Global Variable(heroList, Append To Array, Hero(Genji)); Modify Global Variable(heroList, Append To Array, Hero(Hanzo)); Modify Global Variable(heroList, Append To Array, Hero(Junkrat)); Modify Global Variable(heroList, Append To Array, Hero(McCree)); Modify Global Variable(heroList, Append To Array, Hero(Mei)); Modify Global Variable(heroList, Append To Array, Hero(Pharah)); Modify Global Variable(heroList, Append To Array, Hero(Reaper)); Modify Global Variable(heroList, Append To Array, Hero(Soldier: 76)); Modify Global Variable(heroList, Append To Array, Hero(Sombra)); Modify Global Variable(heroList, Append To Array, Hero(Symmetra)); Modify Global Variable(heroList, Append To Array, Hero(Torbjörn)); Modify Global Variable(heroList, Append To Array, Hero(Tracer)); Modify Global Variable(heroList, Append To Array, Hero(Widowmaker)); Modify Global Variable(heroList, Append To Array, Hero(Ana)); Modify Global Variable(heroList, Append To Array, Hero(Baptiste)); Modify Global Variable(heroList, Append To Array, Hero(Brigitte)); Modify Global Variable(heroList, Append To Array, Hero(Lúcio)); Modify Global Variable(heroList, Append To Array, Hero(Mercy)); Modify Global Variable(heroList, Append To Array, Hero(Moira)); Modify Global Variable(heroList, Append To Array, Hero(Zenyatta)); Set Global Variable(heroList, Randomized Array(Global Variable(heroList))); } } rule("-------HUD-------") { event { Ongoing - Global; } } rule("Initialize HUD for each player") { event { Ongoing - Each Player; All; All; } actions { Create HUD Text(Filtered Array(Event Player, And(Compare(Value In Array(Player Variable(Event Player, hudHeroVisibility), 4), ==, True), Compare(Score Of(Event Player), !=, Subtract(Count Of(Global Variable(heroList)), 2)))), Hero Icon String( Value In Array(Global Variable(heroList), Add(Score Of(Event Player), 1))), String("Next Hero", Null, Null, Null), Value In Array(Global Variable(heroList), Add(Score Of(Event Player), 1)), Left, 1, Red, White, White, Visible To and String, Default Visibility); Create HUD Text(Filtered Array(Event Player, And(Compare(Value In Array(Player Variable(Event Player, hudHeroVisibility), 4), ==, True), Compare(Score Of(Event Player), ==, Subtract(Count Of(Global Variable(heroList)), 2)))), Hero Icon String( Value In Array(Global Variable(heroList), Add(Score Of(Event Player), 1))), String("Final Hero", Null, Null, Null), Value In Array(Global Variable(heroList), Add(Score Of(Event Player), 1)), Left, 1, Red, White, White, Visible To and String, Default Visibility); Create HUD Text(Filtered Array(Event Player, Compare(Value In Array(Player Variable(Event Player, hudHeroVisibility), 3), ==, True)), Hero Icon String(Value In Array(Global Variable(heroList), Add(Score Of(Event Player), 2))), String("Next", Null, Null, Null), Value In Array(Global Variable(heroList), Add(Score Of(Event Player), 2)), Left, 2, Yellow, White, White, Visible To and String, Default Visibility); Create HUD Text(Filtered Array(Event Player, Compare(Value In Array(Player Variable(Event Player, hudHeroVisibility), 2), ==, True)), Hero Icon String(Value In Array(Global Variable(heroList), Add(Score Of(Event Player), 3))), String("Next", Null, Null, Null), Value In Array(Global Variable(heroList), Add(Score Of(Event Player), 3)), Left, 3, Green, White, White, Visible To and String, Default Visibility); Create HUD Text(Filtered Array(Event Player, Compare(Value In Array(Player Variable(Event Player, hudHeroVisibility), 1), ==, True)), Hero Icon String(Value In Array(Global Variable(heroList), Add(Score Of(Event Player), 4))), String("Next", Null, Null, Null), Value In Array(Global Variable(heroList), Add(Score Of(Event Player), 4)), Left, 4, Blue, White, White, Visible To and String, Default Visibility); Create HUD Text(Filtered Array(Event Player, Compare(Value In Array(Player Variable(Event Player, hudHeroVisibility), 0), ==, True)), Hero Icon String(Value In Array(Global Variable(heroList), Add(Score Of(Event Player), 5))), String("Next", Null, Null, Null), Value In Array(Global Variable(heroList), Add(Score Of(Event Player), 5)), Left, 5, Purple, White, White, Visible To and String, Default Visibility); } } rule("Can player see hud? {TRUE, TRUE, TRUE, TRUE, TRUE]") { event { Ongoing - Each Player; All; All; } conditions { Is In Setup == True; } actions { Set Player Variable(Event Player, hudHeroVisibility, True); Modify Player Variable(Event Player, hudHeroVisibility, Append To Array, True); Modify Player Variable(Event Player, hudHeroVisibility, Append To Array, True); Modify Player Variable(Event Player, hudHeroVisibility, Append To Array, True); Modify Player Variable(Event Player, hudHeroVisibility, Append To Array, True); } } disabled rule("hudHeroVisibility debugger (TEST)") { event { Ongoing - Each Player; All; All; } actions { Create HUD Text(All Players(All Teams), String("{0} {1} {2}", Value In Array(Player Variable(Event Player, hudHeroVisibility), 0), Value In Array(Player Variable(Event Player, hudHeroVisibility), 1), String("{0} {1} {2}", Value In Array(Player Variable( Event Player, hudHeroVisibility), 2), Value In Array(Player Variable(Event Player, hudHeroVisibility), 3), Value In Array( Player Variable(Event Player, hudHeroVisibility), 4))), Null, Null, Right, 0, White, White, White, Visible To and String, Default Visibility); } } rule("Show/Hide HUD if 6 hero left") { event { Ongoing - Each Player; All; All; } conditions { Score Of(Event Player) == Subtract(Count Of(Global Variable(heroList)), 6); } actions { Set Player Variable At Index(Event Player, hudHeroVisibility, 0, True); Set Player Variable At Index(Event Player, hudHeroVisibility, 1, True); Set Player Variable At Index(Event Player, hudHeroVisibility, 2, True); Set Player Variable At Index(Event Player, hudHeroVisibility, 3, True); Set Player Variable At Index(Event Player, hudHeroVisibility, 4, True); } } rule("Show/Hide HUD if 5 hero left") { event { Ongoing - Each Player; All; All; } conditions { Score Of(Event Player) == Subtract(Count Of(Global Variable(heroList)), 5); } actions { Set Player Variable At Index(Event Player, hudHeroVisibility, 0, False); Set Player Variable At Index(Event Player, hudHeroVisibility, 1, True); Set Player Variable At Index(Event Player, hudHeroVisibility, 2, True); Set Player Variable At Index(Event Player, hudHeroVisibility, 3, True); Set Player Variable At Index(Event Player, hudHeroVisibility, 4, True); } } rule("Show/Hide HUD if 4 hero left") { event { Ongoing - Each Player; All; All; } conditions { Score Of(Event Player) == Subtract(Count Of(Global Variable(heroList)), 4); } actions { Set Player Variable At Index(Event Player, hudHeroVisibility, 0, False); Set Player Variable At Index(Event Player, hudHeroVisibility, 1, False); Set Player Variable At Index(Event Player, hudHeroVisibility, 2, True); Set Player Variable At Index(Event Player, hudHeroVisibility, 3, True); Set Player Variable At Index(Event Player, hudHeroVisibility, 4, True); } } rule("Show/Hide HUD if 3 hero left") { event { Ongoing - Each Player; All; All; } conditions { Score Of(Event Player) == Subtract(Count Of(Global Variable(heroList)), 3); } actions { Set Player Variable At Index(Event Player, hudHeroVisibility, 0, False); Set Player Variable At Index(Event Player, hudHeroVisibility, 1, False); Set Player Variable At Index(Event Player, hudHeroVisibility, 2, False); Set Player Variable At Index(Event Player, hudHeroVisibility, 3, True); Set Player Variable At Index(Event Player, hudHeroVisibility, 4, True); } } rule("Show/Hide HUD if 2 hero left") { event { Ongoing - Each Player; All; All; } conditions { Score Of(Event Player) == Subtract(Count Of(Global Variable(heroList)), 2); } actions { Set Player Variable At Index(Event Player, hudHeroVisibility, 0, False); Set Player Variable At Index(Event Player, hudHeroVisibility, 1, False); Set Player Variable At Index(Event Player, hudHeroVisibility, 2, False); Set Player Variable At Index(Event Player, hudHeroVisibility, 3, False); Set Player Variable At Index(Event Player, hudHeroVisibility, 4, True); } } rule("Show/Hide HUD if 1 hero left") { event { Ongoing - Each Player; All; All; } conditions { Score Of(Event Player) == Subtract(Count Of(Global Variable(heroList)), 1); } actions { Set Player Variable At Index(Event Player, hudHeroVisibility, 0, False); Set Player Variable At Index(Event Player, hudHeroVisibility, 1, False); Set Player Variable At Index(Event Player, hudHeroVisibility, 2, False); Set Player Variable At Index(Event Player, hudHeroVisibility, 3, False); Set Player Variable At Index(Event Player, hudHeroVisibility, 4, False); } } rule("-------SCORE-------") { event { Ongoing - Global; } } rule("Gain score and advance desired hero when player kill") { event { Player Dealt Final Blow; All; All; } conditions { Is Game In Progress == True; } actions { Wait(0.016, Ignore Condition); Loop If(Is Dead(Event Player)); Play Effect(All Players(All Teams), Good Pickup Effect, White, Event Player, 1); Create Effect(All Players(All Teams), Sparkles, White, Event Player, 1, Visible To Position and Radius); Set Player Variable(Event Player, actualNormalizedHealth, Normalized Health(Event Player)); Set Player Variable(Event Player, actualUltPercent, Ultimate Charge Percent(Event Player)); Wait(0.250, Ignore Condition); Skip If(Compare(Score Of(Event Player), ==, Count Of(Global Variable(heroList))), 1); Big Message(Event Player, Custom String("{0} → {1}", Hero Icon String(Value In Array(Global Variable(heroList), Subtract(Score Of( Event Player), 1))), Hero Icon String(Value In Array(Global Variable(heroList), Score Of(Event Player))), Null)); Wait(1, Ignore Condition); Set Status(Event Player, Null, Unkillable, 0.250); Damage(Event Player, Null, Subtract(Max Health(Event Player), Multiply(Max Health(Event Player), Player Variable(Event Player, actualNormalizedHealth)))); Set Ultimate Charge(Event Player, Player Variable(Event Player, actualUltPercent)); } } rule("Gain score and advance desired hero when ult is charged and button is held") { event { Ongoing - Each Player; All; All; } conditions { Is Alive(Event Player) == True; Is Button Held(Event Player, Ultimate) == True; Ultimate Charge Percent(Event Player) == 100; Is Game In Progress == True; } actions { Small Message(Event Player, String("{0}: {1}", String("Ultimate Ability", Null, Null, Null), String("Next Hero", Null, Null, Null), Null)); Set Ultimate Charge(Event Player, 0); Play Effect(All Players(All Teams), Good Pickup Effect, Yellow, Event Player, 1); Create Effect(All Players(All Teams), Sparkles, Yellow, Event Player, 1, Visible To Position and Radius); Set Player Variable(Event Player, actualNormalizedHealth, Normalized Health(Event Player)); Modify Player Score(Event Player, 1); Wait(0.250, Ignore Condition); Skip If(Compare(Score Of(Event Player), ==, Count Of(Global Variable(heroList))), 1); Big Message(Event Player, Custom String("{0} → {1}", Hero Icon String(Value In Array(Global Variable(heroList), Subtract(Score Of( Event Player), 1))), Hero Icon String(Value In Array(Global Variable(heroList), Score Of(Event Player))), Null)); Wait(1, Ignore Condition); Set Status(Event Player, Null, Unkillable, 0.250); Damage(Event Player, Null, Subtract(Max Health(Event Player), Multiply(Max Health(Event Player), Player Variable(Event Player, actualNormalizedHealth)))); } } disabled rule("Gain ult saying \"Thanks\" (TEST)") { event { Ongoing - Each Player; All; All; } conditions { Is Communicating(Event Player, Thanks) == True; } actions { Set Ultimate Charge(Event Player, 100); } } rule("Gain score and advance desired hero (D) when player press interact button (TEST)") { event { Ongoing - Each Player; All; All; } conditions { Is Button Held(Event Player, Interact) == True; Is Alive(Event Player) == True; Is Game In Progress == True; } actions { Play Effect(All Players(All Teams), Good Pickup Effect, Purple, Event Player, 1); Create Effect(All Players(All Teams), Sparkles, Purple, Event Player, 1, Visible To Position and Radius); Set Player Variable(Event Player, actualNormalizedHealth, Normalized Health(Event Player)); Set Player Variable(Event Player, actualUltPercent, Ultimate Charge Percent(Event Player)); Wait(0.250, Ignore Condition); Modify Player Score(Event Player, 1); Skip If(Compare(Score Of(Event Player), ==, Count Of(Global Variable(heroList))), 1); Big Message(Event Player, Custom String("{0} → {1}", Hero Icon String(Value In Array(Global Variable(heroList), Subtract(Score Of( Event Player), 1))), Hero Icon String(Value In Array(Global Variable(heroList), Score Of(Event Player))), Null)); Wait(1.250, Ignore Condition); Damage(Event Player, Null, Subtract(Max Health(Event Player), Multiply(Max Health(Event Player), Player Variable(Event Player, actualNormalizedHealth)))); Set Ultimate Charge(Event Player, Player Variable(Event Player, actualUltPercent)); } } disabled rule("Dummys Summon (TEST)") { event { Ongoing - Each Player; All; All; } conditions { Is Communicating(Event Player, Hello) == True; } actions { Create Dummy Bot(Value In Array(Global Variable(heroList), 0), All Teams, -1, Position Of(Event Player), Vector(0, 0, 0)); disabled Create Dummy Bot(Value In Array(Global Variable(heroList), 0), All Teams, -1, Position Of(Event Player), Vector(0, 0, 0)); disabled Create Dummy Bot(Value In Array(Global Variable(heroList), 0), All Teams, -1, Position Of(Event Player), Vector(0, 0, 0)); disabled Create Dummy Bot(Value In Array(Global Variable(heroList), 0), All Teams, -1, Position Of(Event Player), Vector(0, 0, 0)); disabled Create Dummy Bot(Value In Array(Global Variable(heroList), 0), All Teams, -1, Position Of(Event Player), Vector(0, 0, 0)); disabled Create Dummy Bot(Value In Array(Global Variable(heroList), 0), All Teams, -1, Position Of(Event Player), Vector(0, 0, 0)); } } disabled rule("Dummy Aim Bot (TEST)") { event { Ongoing - Each Player; All; All; } conditions { Is Dummy Bot(Event Player) == True; } actions { Start Facing(Event Player, Direction Towards(Event Player, Closest Player To(Event Player, Opposite Team Of(Team Of( Event Player)))), 10000, To World, Direction and Turn Rate); Start Holding Button(Event Player, Primary Fire); } } rule("Kill yourself punishment") { event { Player Died; All; All; } conditions { Attacker == Event Player; } actions { Small Message(Event Player, String("{0} {1} {2}", String("You Lose", Null, Null, Null), 1, String("Elimination", Null, Null, Null))); Small Message(Event Player, String("{0} {1}", String("You Lose", Null, Null, Null), String("Ultimate Ability", Null, Null, Null), Null)); Wait(1, Ignore Condition); Skip If(Compare(Score Of(Event Player), <=, -1), 1); Big Message(Event Player, Custom String("{0} ", Hero Icon String(Value In Array(Global Variable(heroList), Score Of( Event Player))), Null, Null)); Wait(1, Ignore Condition); Destroy All Effects; } } rule("If a player's actual hero differs from the player's desired hero, force the hero") { event { Ongoing - Each Player; All; All; } conditions { Hero Of(Event Player) != Value In Array(Global Variable(heroList), Score Of(Event Player)); Is Alive(Event Player) == True; } actions { Wait(0.250, Ignore Condition); Create In-World Text(All Players(All Teams), Hero Icon String(Value In Array(Global Variable(heroList), Score Of(Event Player))), Event Player, 1, Clip Against Surfaces, Visible To Position and String, White, Default Visibility); Start Forcing Player To Be Hero(Event Player, Value In Array(Global Variable(heroList), Score Of(Event Player))); Preload Hero(Event Player, Array Slice(Global Variable(heroList), Add(Score Of(Event Player), 1), 12)); Wait(0.750, Ignore Condition); Destroy All In-World Text; Destroy All Effects; Loop If Condition Is True; } } rule("-------VICTORY-------") { event { Ongoing - Global; } } rule("GG 1") { event { Ongoing - Each Player; All; All; } conditions { Score Of(Event Player) == Count Of(Global Variable(heroList)); } actions { Declare Player Victory(Last Of(Sorted Array(All Players(All Teams), Score Of(Current Array Element)))); Big Message(All Players(All Teams), String("GG", Null, Null, Null)); Start Forcing Throttle(Event Player, 0, 0, 0, 0, 0, 0); Disallow Button(All Players(All Teams), Primary Fire); Disallow Button(All Players(All Teams), Secondary Fire); Disallow Button(All Players(All Teams), Ability 1); Disallow Button(All Players(All Teams), Ability 2); Disallow Button(All Players(All Teams), Ultimate); Disallow Button(All Players(All Teams), Interact); Disallow Button(All Players(All Teams), Jump); Disallow Button(All Players(All Teams), Crouch); Communicate(All Players(All Teams), Emote Up); } } rule("GG 2") { event { Ongoing - Each Player; All; All; } conditions { Score Of(Event Player) == Count Of(Global Variable(heroList)); Is On Ground(Event Player) == True; } actions { Communicate(All Players(All Teams), Emote Up); } } rule("GG 3") { event { Ongoing - Each Player; All; All; } conditions { Score Of(Event Player) == Count Of(Global Variable(heroList)); } actions { Communicate(All Players(All Teams), Emote Up); Wait(1, Ignore Condition); Loop; } } rule("GG 4") { event { Ongoing - Each Player; All; All; } conditions { Score Of(Event Player) == Count Of(Global Variable(heroList)); } actions { Create Effect(All Players(All Teams), Sparkles, Purple, Position Of(Event Player), 200, None); Create Effect(All Players(All Teams), Sparkles, Blue, Add(Position Of(Event Player), Vector(0, 1, 0)), 200, None); Create Effect(All Players(All Teams), Sparkles, Green, Add(Position Of(Event Player), Vector(0, 2, 0)), 200, None); Create Effect(All Players(All Teams), Sparkles, Yellow, Add(Position Of(Event Player), Vector(0, 3, 0)), 200, None); Create Effect(All Players(All Teams), Sparkles, Red, Add(Position Of(Event Player), Vector(0, 4, 0)), 200, None); } } rule("Create leader icon") { event { Ongoing - Each Player; All; All; } conditions { Score Of(Event Player) >= Score Of(Last Of(Sorted Array(All Players(All Teams), Score Of(Current Array Element)))); Score Of(Event Player) >= 1; } actions { Create Icon(Filtered Array(All Players(All Teams), Is In Line of Sight(Current Array Element, Event Player, Barriers Do Not Block LOS)), Event Player, Flag, Visible To and Position, Yellow, False); Set Player Variable(Event Player, leaderIcon, Last Created Entity); } } rule("Destroy leader icon") { event { Ongoing - Each Player; All; All; } conditions { Score Of(Event Player) < Score Of(Last Of(Sorted Array(All Players(All Teams), Score Of(Current Array Element)))); Score Of(Event Player) >= 1; } actions { Destroy Icon(Player Variable(Event Player, leaderIcon)); } } rule("-------OTHERS-------") { event { Ongoing - Global; } } rule("Game Mode Description") { event { Ongoing - Global; } conditions { Is Game In Progress == True; } actions { Create HUD Text(All Players(All Teams), Null, Null, Custom String("Gun Game | Keep HP and ult % | Ult to skip | v5.4.0", Null, Null, Null), Right, -100, White, White, White, Visible To and String, Default Visibility); Create HUD Text(All Players(All Teams), Null, Null, Custom String(" ", Null, Null, Null), Right, -99.500, White, White, White, Visible To and String, Default Visibility); Create HUD Text(All Players(All Teams), Null, Null, Custom String("Kill or play the ultimate to skip to the next hero", Null, Null, Null), Right, -99, White, White, White, Visible To and String, Default Visibility); Create HUD Text(All Players(All Teams), Null, Null, Custom String("You keep % of health and ultimate when you swap", Null, Null, Null), Right, -98, White, White, White, Visible To and String, Default Visibility); Create HUD Text(All Players(All Teams), Null, Null, Custom String(" ", Null, Null, Null), Right, -97.500, White, White, White, Visible To and String, Default Visibility); Create HUD Text(All Players(All Teams), Null, Null, Custom String("Created by Jokaes#2263", Null, Null, Null), Right, -97, White, White, White, Visible To and String, Default Visibility); Create HUD Text(All Players(All Teams), Null, Null, Custom String("Updated code & my codes: jokaes.github.io", Null, Null, Null), Right, -96, White, White, White, Visible To and String, Default Visibility); Small Message(All Players(All Teams), Custom String("Gun Game | Keep HP and ult % | Ult to skip | v5.4.0", Null, Null, Null)); Wait(3.500, Ignore Condition); Small Message(All Players(All Teams), Custom String( "Kill or play the ultimate to skip to the next hero. You keep % of health and ultimate when you swap.", Null, Null, Null)); Wait(3.500, Ignore Condition); Small Message(All Players(All Teams), Custom String("Created by Jokaes#2263", Null, Null, Null)); } } rule("Game Mode Description for players who join") { event { Player Joined Match; All; All; } conditions { Is Game In Progress == True; } actions { Wait(3.500, Ignore Condition); Small Message(Event Player, Custom String("Gun Game | Keep HP and ult % | Ult to skip | v5.4.0", Null, Null, Null)); Wait(3.500, Ignore Condition); Small Message(Event Player, Custom String( "Kill or play the ultimate to skip to the next hero. You keep % of health and ultimate when you swap.", Null, Null, Null)); Wait(3.500, Ignore Condition); Small Message(Event Player, Custom String("Created by Jokaes#2263", Null, Null, Null)); } } disabled rule("Created by Jokaes#2263") { event { Ongoing - Global; } }
View Fullscreen
Copy to clipboard

Update Log

  • Added Echo
5.0.0
A4KH3

0 Comments

Log in or Sign up to place a comment.
Websites are expensive, support Workshop.codes
Workshop.codes - Background image