Create
Return to post

Comparing difference between and

View raw
  • settings
  • {
  • main
  • {
  • Description: "Giacomand's Duel Zones v0.2.7 - Quick easy random 1v1s with a small built in MMR! Latest code at: https://workshop.codes/duel-zones"
  • }
  • lobby
  • {
  • Allow Players Who Are In Queue: Yes
  • Match Voice Chat: Enabled
  • Return To Lobby: Never
  • }
  • modes
  • {
  • Deathmatch
  • {
  • Game Length In Minutes: 15
  • Score To Win: 50
  • enabled maps
  • {
  • Havana
  • }
  • }
  • General
  • {
  • Allow Hero Switching: Off
  • Game Mode Start: Immediately
  • Hero Limit: Off
  • Spawn Health Packs: Disabled
  • }
  • }
  • heroes
  • {
  • General
  • {
  • Ultimate Ability: Off
  • Baptiste
  • {
  • Immortality Field: Off
  • }
  • Lúcio
  • {
  • Healing Received: 50%
  • }
  • Mei
  • {
  • Primary Fire: Off
  • }
  • Sombra
  • {
  • Stealth: Off
  • }
  • Torbjörn
  • {
  • Deploy Turret: Off
  • }
  • disabled heroes
  • {
  • Bastion
  • Brigitte
  • D.Va
  • Echo
  • Mercy
  • Moira
  • Orisa
  • Reaper
  • Reinhardt
  • Roadhog
  • Sigma
  • Symmetra
  • Winston
  • Wrecking Ball
  • Zarya
  • }
  • }
  • }
  • }
  • variables
  • {
  • global:
  • 0: DEBUG
  • 1: DEBUG_ZonePosition
  • 2: DEBUG_ZoneRadius
  • 3: DEBUG_TempFacingDir
  • 4: DuelZonePositionList
  • 5: DuelZoneRadiusList
  • 6: DuelZoneSpawnList
  • 7: LobbyPosition
  • 8: TempWaitingPlayersList
  • 9: TempPlayerOne
  • 10: TempPlayerTwo
  • 11: TempAvailableDuelZones
  • 12: ConfigScoreToWin
  • 13: ConfigMatchmakerTimer
  • 14: MatchmakerTicker
  • 15: LobbySignPosition
  • 16: BarrierPositionList
  • 17: BarrierRadiusList
  • 19: TempOrphanPlayers
  • 22: HeroPoolArray
  • 23: TempHeroPool
  • 25: ZDebug
  • player:
  • 0: ActiveDuelZone
  • 1: PlayerState
  • 2: MatchLosses
  • 4: PlayerNumberOffset
  • 5: EnemyPlayerNumberOffset
  • 6: MatchScore
  • 7: TempOpponent
  • 8: TimeSpentWaiting
  • 11: LastOpponent
  • 12: RepeatedOpponentCounter
  • 13: CurrentOpponent
  • 14: Spectating
  • }
  • disabled rule("DEBUG: Enable this for Debug Mode")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • actions
  • {
  • Global.DEBUG = True;
  • }
  • }
  • rule("DEBUG: Is Not Enabled")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Global.DEBUG == False;
  • }
  • actions
  • {
  • Disable Inspector Recording;
  • }
  • }
  • rule("DEBUG: Init Player Debug")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Global.DEBUG == True;
  • }
  • actions
  • {
  • Create HUD Text(Event Player, Position Of(Event Player), Null, Null, Left, 0, White, White, White, Visible To and String,
  • Default Visibility);
  • Create HUD Text(Event Player, Facing Direction Of(Event Player), Null, Null, Left, 0, White, White, White, Visible To and String,
  • Default Visibility);
  • }
  • }
  • rule("DEBUG: Init Global Debug")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Global.DEBUG == True;
  • }
  • actions
  • {
  • disabled Create HUD Text(All Players(All Teams), Null, Null, Custom String("DEBUG INFO"), Left, -1, White, White, Red,
  • Visible To and String, Default Visibility);
  • disabled Create HUD Text(All Players(All Teams), Null, Global.DEBUG_ZonePosition, Null, Left, 0, White, White, White, Visible To and String,
  • Default Visibility);
  • disabled Create HUD Text(All Players(All Teams), Null, Global.DEBUG_ZoneRadius, Null, Left, 0, White, White, White, Visible To and String,
  • Default Visibility);
  • disabled Create Effect(All Players(All Teams), Sphere, Red, Global.DEBUG_ZonePosition, Global.DEBUG_ZoneRadius,
  • Visible To Position and Radius);
  • disabled Abort;
  • Wait(4, Ignore Condition);
  • Create Dummy Bot(Hero(McCree), All Teams, -1, Vector(0, 0, 0), Vector(0, 0, 0));
  • Create Dummy Bot(Hero(Ashe), All Teams, -1, Vector(0, 0, 0), Vector(0, 0, 0));
  • Create Dummy Bot(Hero(Baptiste), All Teams, -1, Vector(0, 0, 0), Vector(0, 0, 0));
  • Create Dummy Bot(Hero(Genji), All Teams, -1, Vector(0, 0, 0), Vector(0, 0, 0));
  • Create Dummy Bot(Hero(Hanzo), All Teams, -1, Vector(0, 0, 0), Vector(0, 0, 0));
  • Create Dummy Bot(Hero(Junkrat), All Teams, -1, Vector(0, 0, 0), Vector(0, 0, 0));
  • Create Dummy Bot(Hero(Tracer), All Teams, -1, Vector(0, 0, 0), Vector(0, 0, 0));
  • Create Dummy Bot(Hero(Doomfist), All Teams, -1, Vector(0, 0, 0), Vector(0, 0, 0));
  • Create Dummy Bot(Hero(Bastion), All Teams, -1, Vector(0, 0, 0), Vector(0, 0, 0));
  • Create Dummy Bot(Hero(Lúcio), All Teams, -1, Vector(0, 0, 0), Vector(0, 0, 0));
  • Create Dummy Bot(Hero(Zenyatta), All Teams, -1, Vector(0, 0, 0), Vector(0, 0, 0));
  • }
  • }
  • rule("DEBUG: Not invulnerable in spawn")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Global.DEBUG == True;
  • (Event Player.PlayerState == 2 || Event Player.PlayerState == -4) == True;
  • Has Status(Event Player, Phased Out) == False;
  • }
  • actions
  • {
  • Big Message(All Players(All Teams), Custom String("DEBUG: {0} NOT PHASED OUT", Event Player));
  • }
  • }
  • disabled rule("DEBUG: Set Map Duel Zone Position")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Global.DEBUG == True;
  • Is Button Held(Event Player, Primary Fire) == True;
  • }
  • actions
  • {
  • Global.DEBUG_ZonePosition = Ray Cast Hit Position(Eye Position(Event Player), Facing Direction Of(Event Player)
  • * 1000 + Eye Position(Event Player), All Players(All Teams), Event Player, True);
  • }
  • }
  • disabled rule("DEBUG: Set Duel Zone Radius")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Global.DEBUG == True;
  • (Is Button Held(Event Player, Jump) || Is Button Held(Event Player, Crouch)) == True;
  • }
  • actions
  • {
  • Skip If(Is Button Held(Event Player, Jump), 2);
  • Global.DEBUG_ZoneRadius += 5;
  • Abort;
  • Global.DEBUG_ZoneRadius -= 5;
  • }
  • }
  • rule("DEBUG: Kill Player #2")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Global.DEBUG == True;
  • Is Communicating(Event Player, Hello) == True;
  • }
  • actions
  • {
  • Kill(Players In Slot(1, All Teams), Null);
  • }
  • }
  • rule("DEBUG: Destroy Dummy Player #2")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Global.DEBUG == True;
  • Is Communicating(Event Player, Thanks) == True;
  • }
  • actions
  • {
  • Destroy Dummy Bot(All Teams, 1);
  • Wait(5, Ignore Condition);
  • Create Dummy Bot(Hero(McCree), All Teams, 1, Vector(0, 0, 0), Vector(0, 0, 0));
  • }
  • }
  • rule("DEBUG: No Clip")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Global.DEBUG == True;
  • Is Button Held(Event Player, Interact) == True;
  • }
  • actions
  • {
  • Global.DEBUG_TempFacingDir = Facing Direction Of(Event Player);
  • Teleport(Event Player, Facing Direction Of(Event Player) * 10 + Eye Position(Event Player));
  • Set Facing(Event Player, Global.DEBUG_TempFacingDir, To World);
  • Apply Impulse(Event Player, Vector(0, 1, 0), 5, To World, Cancel Contrary Motion);
  • }
  • }
  • rule("MAP: Havana")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Current Map == Map(Havana);
  • }
  • actions
  • {
  • Global.LobbyPosition = Vector(-102.513, 6, -73.331);
  • Global.LobbySignPosition = Vector(-94.040, 6.556, -69.077);
  • Global.DuelZonePositionList = Empty Array;
  • Global.DuelZoneRadiusList = Empty Array;
  • Global.DuelZoneSpawnList = Empty Array;
  • Global.BarrierPositionList = Empty Array;
  • Global.BarrierRadiusList = Empty Array;
  • Modify Global Variable(DuelZonePositionList, Append To Array, Vector(-96.249, 4, -68.923));
  • Modify Global Variable(DuelZoneRadiusList, Append To Array, 35);
  • Modify Global Variable(DuelZoneSpawnList, Append To Array, Vector(-108.678, 5.199, -53.831));
  • Modify Global Variable(DuelZoneSpawnList, Append To Array, Vector(-83.129, 5.348, -78.313));
  • Modify Global Variable(DuelZonePositionList, Append To Array, Vector(31.100, 6.199, -83.700));
  • Modify Global Variable(DuelZoneRadiusList, Append To Array, 54);
  • Modify Global Variable(DuelZoneSpawnList, Append To Array, Vector(-2.441, 7.177, -95.874));
  • Modify Global Variable(DuelZoneSpawnList, Append To Array, Vector(18.313, 7.174, -51.988));
  • Modify Global Variable(DuelZonePositionList, Append To Array, Vector(33.053, 17.395, -77.519));
  • Modify Global Variable(DuelZoneRadiusList, Append To Array, 75);
  • Modify Global Variable(DuelZoneSpawnList, Append To Array, Vector(28.513, 11.551, -95.304));
  • Modify Global Variable(DuelZoneSpawnList, Append To Array, Vector(56.393, 13.551, -68.741));
  • Modify Global Variable(DuelZonePositionList, Append To Array, Vector(66.423, 6.317, -94.950));
  • Modify Global Variable(DuelZoneRadiusList, Append To Array, 50);
  • Modify Global Variable(DuelZoneSpawnList, Append To Array, Vector(76.863, 8.341, -72.242));
  • Modify Global Variable(DuelZoneSpawnList, Append To Array, Vector(102.236, 3.310, -72.689));
  • Modify Global Variable(DuelZonePositionList, Append To Array, Vector(149.344, 12.273, -46.853));
  • Modify Global Variable(DuelZoneRadiusList, Append To Array, 30);
  • Modify Global Variable(DuelZoneSpawnList, Append To Array, Vector(150.411, 10.427, -63.278));
  • Modify Global Variable(DuelZoneSpawnList, Append To Array, Vector(151.415, 10.352, -29.396));
  • Modify Global Variable(DuelZonePositionList, Append To Array, Vector(209.334, 27.500, -40.314));
  • Modify Global Variable(DuelZoneRadiusList, Append To Array, 30);
  • Modify Global Variable(DuelZoneSpawnList, Append To Array, Vector(214.653, 28.849, -29.623));
  • Modify Global Variable(DuelZoneSpawnList, Append To Array, Vector(214.674, 28.848, -50.187));
  • Modify Global Variable(BarrierPositionList, Append To Array, Vector(176.452, 11, -46.671));
  • Modify Global Variable(BarrierRadiusList, Append To Array, 15);
  • Modify Global Variable(BarrierPositionList, Append To Array, Vector(182.679, 25.659, -45.952));
  • Modify Global Variable(BarrierRadiusList, Append To Array, 19);
  • }
  • }
  • rule("CONFIG: Setup Config (ConfigScoreToWin is broken atm)")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • actions
  • {
  • Global.ConfigScoreToWin = 3;
  • Global.ConfigMatchmakerTimer = 15;
  • }
  • }
  • rule("INIT: Pre-Assemble Heroes")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • actions
  • {
  • Set Match Time(2);
  • Disable Built-In Game Mode Announcer;
  • Disable Built-In Game Mode Scoring;
  • }
  • }
  • rule("INIT: Post-Assemble Heroes")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Is Game In Progress == True;
  • }
  • actions
  • {
  • Set Match Time(3590);
  • }
  • }
  • rule("INIT: Setup Random 5 * 6 Sized Hero Pool")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • actions
  • {
  • Global.HeroPoolArray = Empty Array;
  • Modify Global Variable(HeroPoolArray, Append To Array, Hero(Brigitte));
  • Modify Global Variable(HeroPoolArray, Append To Array, Hero(Brigitte));
  • Modify Global Variable(HeroPoolArray, Append To Array, Hero(Brigitte));
  • Modify Global Variable(HeroPoolArray, Append To Array, Hero(Brigitte));
  • Modify Global Variable(HeroPoolArray, Append To Array, Hero(Brigitte));
  • Modify Global Variable(HeroPoolArray, Append To Array, Hero(Brigitte));
  • Modify Global Variable(HeroPoolArray, Append To Array, Hero(Brigitte));
  • Modify Global Variable(HeroPoolArray, Append To Array, Hero(Brigitte));
  • Modify Global Variable(HeroPoolArray, Append To Array, Hero(Brigitte));
  • Modify Global Variable(HeroPoolArray, Append To Array, Hero(Brigitte));
  • Modify Global Variable(HeroPoolArray, Append To Array, Hero(Brigitte));
  • Modify Global Variable(HeroPoolArray, Append To Array, Hero(Brigitte));
  • Modify Global Variable(HeroPoolArray, Append To Array, Hero(Brigitte));
  • Modify Global Variable(HeroPoolArray, Append To Array, Hero(Brigitte));
  • Modify Global Variable(HeroPoolArray, Append To Array, Hero(Brigitte));
  • Modify Global Variable(HeroPoolArray, Append To Array, Hero(Brigitte));
  • Modify Global Variable(HeroPoolArray, Append To Array, Hero(Brigitte));
  • Modify Global Variable(HeroPoolArray, Append To Array, Hero(Brigitte));
  • Modify Global Variable(HeroPoolArray, Append To Array, Hero(Brigitte));
  • Modify Global Variable(HeroPoolArray, Append To Array, Hero(Brigitte));
  • Modify Global Variable(HeroPoolArray, Append To Array, Hero(Brigitte));
  • Modify Global Variable(HeroPoolArray, Append To Array, Hero(Brigitte));
  • Modify Global Variable(HeroPoolArray, Append To Array, Hero(Brigitte));
  • Modify Global Variable(HeroPoolArray, Append To Array, Hero(Brigitte));
  • Modify Global Variable(HeroPoolArray, Append To Array, Hero(Brigitte));
  • Modify Global Variable(HeroPoolArray, Append To Array, Hero(Brigitte));
  • Modify Global Variable(HeroPoolArray, Append To Array, Hero(Brigitte));
  • Modify Global Variable(HeroPoolArray, Append To Array, Hero(Brigitte));
  • Modify Global Variable(HeroPoolArray, Append To Array, Hero(Brigitte));
  • Modify Global Variable(HeroPoolArray, Append To Array, Hero(Brigitte));
  • }
  • }
  • rule("INIT: Global HUD and Signs")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • actions
  • {
  • Create HUD Text(All Players(All Teams), Null, Custom String("Giacomand's Duel Zones"), Custom String(
  • "Server Load - {0}% - {1}% avg - {2}% peak", Server Load, Server Load Average, Server Load Peak), Left, -10, White, Yellow,
  • White, Visible To and String, Default Visibility);
  • disabled Create HUD Text(All Players(All Teams), Null, Null, Custom String("Score to win is {0}", Global.ConfigScoreToWin), Right, 0, White,
  • White, White, Visible To and String, Default Visibility);
  • disabled Create HUD Text(All Players(All Teams), Null, Null, Custom String("Matchmaker Timer is {0} sec(s)", Global.ConfigMatchmakerTimer),
  • Right, 0, White, White, White, Visible To and String, Default Visibility);
  • disabled Create HUD Text(All Players(All Teams), Null, Custom String("Server Load - {0}% - {1}% avg - {2}% peak", Server Load,
  • Server Load Average, Server Load Peak), Null, Right, 1, White, White, White, Visible To and String, Default Visibility);
  • disabled Create HUD Text(Filtered Array(All Players(All Teams), Current Array Element.PlayerState == 2), Null, Null, Custom String(
  • "Searching for opponent.."), Left, -1, White, White, White, Visible To and String, Default Visibility);
  • disabled Create HUD Text(Filtered Array(All Players(All Teams), Current Array Element.PlayerState == 2), Null, Null, Custom String(
  • "Matches will be created in {0} sec(s)", Global.MatchmakerTicker), Left, 0, White, White, White, Visible To and String,
  • Default Visibility);
  • Create HUD Text(All Players(All Teams), Null, String(""), String("----------"), Left, 0, White, Yellow, White,
  • Visible To and String, Default Visibility);
  • Create In-World Text(All Players(All Teams), Custom String("Waiting Room"), Global.LobbySignPosition + Vector(0, 2, 0), 2,
  • Clip Against Surfaces, Visible To and String, Yellow, Default Visibility);
  • Create In-World Text(All Players(All Teams), Custom String("Score to win is {0}", Global.ConfigScoreToWin),
  • Global.LobbySignPosition + Vector(0, 1.500, 0), 1.500, Clip Against Surfaces, Visible To and String, White,
  • Default Visibility);
  • Create In-World Text(All Players(All Teams), Custom String("Matches will be created in {0} sec(s)..", Global.MatchmakerTicker),
  • Global.LobbySignPosition + Vector(0, 1, 0), 1.500, Clip Against Surfaces, Visible To and String, White, Default Visibility);
  • Create In-World Text(All Players(All Teams), Custom String("AFK ROOM"), Vector(-92.680, 5.500, -63.203), 1.500,
  • Clip Against Surfaces, Visible To and String, White, Default Visibility);
  • }
  • }
  • rule("INIT: Player HUD")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • actions
  • {
  • disabled Create HUD Text(Filtered Array(Event Player, Current Array Element.PlayerState > 2), Hero Icon String(Hero Of(Filtered Array(
  • All Players(All Teams),
  • Event Player.ActiveDuelZone == Current Array Element.ActiveDuelZone && Event Player != Current Array Element))),
  • Filtered Array(All Players(All Teams),
  • Event Player.ActiveDuelZone == Current Array Element.ActiveDuelZone && Event Player != Current Array Element), String(
  • "{0} - {1}", Event Player.MatchScore, Filtered Array(All Players(All Teams),
  • Event Player.ActiveDuelZone == Current Array Element.ActiveDuelZone && Event Player != Current Array Element).MatchScore),
  • Left, 1, Team 2, Team 2, White, Visible To and String, Default Visibility);
  • Create HUD Text(Filtered Array(Event Player, Current Array Element.PlayerState > 2), Hero Icon String(
  • Global.HeroPoolArray[5 * Event Player.ActiveDuelZone + 0 + Event Player.CurrentOpponent.MatchLosses]),
  • Event Player.CurrentOpponent, String("{0} - {1}", Event Player.MatchScore, Event Player.CurrentOpponent.MatchScore), Left, 1,
  • Team 2, Team 2, White, Visible To and String, Default Visibility);
  • Create HUD Text(Filtered Array(Event Player,
  • Current Array Element.PlayerState > 2 && Event Player.CurrentOpponent.MatchLosses < 2), Hero Icon String(
  • Global.HeroPoolArray[5 * Event Player.ActiveDuelZone + Event Player.CurrentOpponent.MatchLosses + 1]), Null, Null, Left, 2,
  • Team 2, Team 2, White, Visible To and String, Default Visibility);
  • Create HUD Text(Filtered Array(Event Player,
  • Current Array Element.PlayerState > 2 && Event Player.CurrentOpponent.MatchLosses < 1), Hero Icon String(
  • Global.HeroPoolArray[5 * Event Player.ActiveDuelZone + Event Player.CurrentOpponent.MatchLosses + 2]), Null, Null, Left, 3,
  • Team 2, Team 2, White, Visible To and String, Default Visibility);
  • }
  • }
  • rule("INIT: Setup Duel Zone")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Is Game In Progress == True;
  • }
  • actions
  • {
  • Create Effect(Filtered Array(All Living Players(All Teams), Current Array Element.ActiveDuelZone == 0), Sphere, Yellow,
  • Global.DuelZonePositionList[0], Global.DuelZoneRadiusList[0], Visible To Position and Radius);
  • Create Effect(Filtered Array(All Living Players(All Teams), Current Array Element.ActiveDuelZone == 1), Sphere, Yellow,
  • Global.DuelZonePositionList[1], Global.DuelZoneRadiusList[1], Visible To Position and Radius);
  • Create Effect(Filtered Array(All Living Players(All Teams), Current Array Element.ActiveDuelZone == 2), Sphere, Yellow,
  • Global.DuelZonePositionList[2], Global.DuelZoneRadiusList[2], Visible To Position and Radius);
  • Create Effect(Filtered Array(All Living Players(All Teams), Current Array Element.ActiveDuelZone == 3), Sphere, Yellow,
  • Global.DuelZonePositionList[3], Global.DuelZoneRadiusList[3], Visible To Position and Radius);
  • Create Effect(Filtered Array(All Living Players(All Teams), Current Array Element.ActiveDuelZone == 4), Sphere, Yellow,
  • Global.DuelZonePositionList[4], Global.DuelZoneRadiusList[4], Visible To Position and Radius);
  • Create Effect(Filtered Array(All Living Players(All Teams), Current Array Element.ActiveDuelZone == 5), Sphere, Yellow,
  • Global.DuelZonePositionList[5], Global.DuelZoneRadiusList[5], Visible To Position and Radius);
  • }
  • }
  • rule("INIT: Create Barriers")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • actions
  • {
  • Create Effect(All Players(All Teams), Sphere, Red, Global.BarrierPositionList[0], Global.BarrierRadiusList[0], Visible To);
  • Abort If(Count Of(Global.BarrierPositionList) < 1);
  • Create Effect(All Players(All Teams), Sphere, Red, Global.BarrierPositionList[1], Global.BarrierRadiusList[1], Visible To);
  • Abort If(Count Of(Global.BarrierPositionList) < 2);
  • Create Effect(All Players(All Teams), Sphere, Red, Global.BarrierPositionList[2], Global.BarrierRadiusList[2], Visible To);
  • Abort If(Count Of(Global.BarrierPositionList) < 3);
  • }
  • }
  • rule("INIT PLAYER: Setup Data")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • actions
  • {
  • Event Player.ActiveDuelZone = -1;
  • disabled Disable Built-In Game Mode Respawning(Event Player);
  • Preload Hero(Event Player, Hero(Brigitte));
  • }
  • }
  • rule("ON STATE 1: Teleport Player To Lobby")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Event Player.PlayerState == 1;
  • Is Alive(Event Player) == True;
  • }
  • actions
  • {
  • Teleport(Event Player, Global.LobbyPosition + Vector(Random Real(-3, 3), 0, Random Real(-3, 3)));
  • Wait(0.100, Abort When False);
  • Event Player.ActiveDuelZone = -1;
  • Event Player.MatchLosses = 0;
  • Event Player.MatchScore = 0;
  • Event Player.PlayerState = 2;
  • Event Player.TimeSpentWaiting = 0;
  • Chase Player Variable At Rate(Event Player, TimeSpentWaiting, 9999, 1, None);
  • Set Status(Event Player, Null, Phased Out, 9999);
  • If(Hero Of(Event Player) == Hero(Tracer));
  • Disallow Button(Event Player, Ability 2);
  • End;
  • disabled Global.ZDebug = Filtered Array(All Living Players(All Teams),
  • Current Array Element.PlayerState == 2 && Event Player != Current Array Element);
  • If(Count Of(Filtered Array(All Living Players(All Teams),
  • Current Array Element.PlayerState == 2 && Event Player != Current Array Element)) <= 1);
  • Global.MatchmakerTicker = Global.ConfigMatchmakerTimer;
  • End;
  • }
  • }
  • rule("ON STATE 3: Teleport / Reset Player For Match")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Event Player.PlayerState == 3;
  • }
  • actions
  • {
  • Teleport(Event Player, Global.LobbyPosition + Vector(Random Real(-3, 3), 100, Random Real(-3, 3)));
  • Preload Hero(Event Player, Hero(Brigitte));
  • Wait(0.250, Ignore Condition);
  • Start Forcing Player To Be Hero(Event Player, Hero(Brigitte));
  • Wait(0.016, Ignore Condition);
  • Start Forcing Player To Be Hero(Event Player, Global.HeroPoolArray[5 * Event Player.ActiveDuelZone + Event Player.MatchLosses]);
  • Stop Forcing Player To Be Hero(Event Player);
  • Disallow Button(Event Player, Primary Fire);
  • Disallow Button(Event Player, Secondary Fire);
  • Disallow Button(Event Player, Ability 1);
  • Disallow Button(Event Player, Ability 2);
  • Teleport(Event Player, Global.DuelZoneSpawnList[Event Player.ActiveDuelZone * 2 + Event Player.PlayerNumberOffset]);
  • Wait(0.100, Ignore Condition);
  • Set Facing(Event Player, Direction Towards(Eye Position(Event Player),
  • Global.DuelZoneSpawnList[Event Player.ActiveDuelZone * 2 + Event Player.EnemyPlayerNumberOffset]), To World);
  • Event Player.PlayerState = 4;
  • Play Effect(Event Player, Buff Explosion Sound, White, Event Player, 50);
  • Small Message(Event Player, 3);
  • Wait(1, Ignore Condition);
  • Play Effect(Event Player, Buff Explosion Sound, White, Event Player, 50);
  • Small Message(Event Player, 2);
  • Wait(1, Ignore Condition);
  • Play Effect(Event Player, Buff Explosion Sound, White, Event Player, 50);
  • Small Message(Event Player, 1);
  • Wait(1, Ignore Condition);
  • Play Effect(Event Player, Ring Explosion Sound, White, Event Player, 86);
  • Small Message(Event Player, Custom String("FIGHT!"));
  • Allow Button(Event Player, Primary Fire);
  • Allow Button(Event Player, Secondary Fire);
  • Allow Button(Event Player, Ability 1);
  • Allow Button(Event Player, Ability 2);
  • Set Status(Event Player, Null, Phased Out, 0);
  • }
  • }
  • rule("ON STATE 4: Player In Match Dies")
  • {
  • event
  • {
  • Player Died;
  • All;
  • All;
  • }
  • conditions
  • {
  • Is Game In Progress == True;
  • Event Player.PlayerState == 4;
  • }
  • actions
  • {
  • Event Player.MatchLosses += 1;
  • Event Player.TempOpponent = Filtered Array(All Players(All Teams),
  • Event Player.ActiveDuelZone == Current Array Element.ActiveDuelZone && Event Player != Current Array Element);
  • Event Player.TempOpponent = First Of(Event Player.TempOpponent);
  • Event Player.TempOpponent.MatchScore += 1;
  • If(Event Player.TempOpponent.MatchScore < Global.ConfigScoreToWin);
  • Play Effect(Event Player.TempOpponent, Explosion Sound, White, Event Player.TempOpponent, 80);
  • Event Player.PlayerState = 5;
  • Disable Built-In Game Mode Respawning(Event Player.TempOpponent);
  • Event Player.TempOpponent.PlayerState = 7;
  • "Match isn't over, abort running the rest of the code"
  • Abort;
  • End;
  • Set Player Score(Event Player, Max(Min(Score Of(Event Player) + -1, 5), 0));
  • Set Player Score(Event Player.TempOpponent, Max(Min(Score Of(Event Player.TempOpponent) + 1, 5), 0));
  • Big Message(Event Player.TempOpponent, Custom String("YOU WON!"));
  • Wait(1, Ignore Condition);
  • Event Player.PlayerState = 1;
  • "Check if the opponent hasn't left"
  • Abort If(!Entity Exists(Event Player.TempOpponent));
  • Event Player.TempOpponent.PlayerState = 1;
  • If(Event Player.LastOpponent == Event Player.TempOpponent);
  • Event Player.RepeatedOpponentCounter += 1;
  • Else;
  • Event Player.RepeatedOpponentCounter = 0;
  • Event Player.LastOpponent = Event Player.TempOpponent;
  • End;
  • "Check if the opponent's opponent hasn't left or become invalid somehow"
  • Abort If(!Entity Exists(Event Player.TempOpponent.TempOpponent));
  • If(Event Player.TempOpponent.LastOpponent != Event Player);
  • Event Player.TempOpponent.RepeatedOpponentCounter = 0;
  • Event Player.TempOpponent.LastOpponent = Event Player;
  • End;
  • Global.DEBUG = 0;
  • }
  • }
  • rule("ON STATE 5: Wait For Loser to Spawn")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Is Game In Progress == True;
  • Event Player.PlayerState == 5;
  • Is Dead(Event Player) == False;
  • Is Alive(Event Player) == True;
  • }
  • actions
  • {
  • Event Player.PlayerState = 6;
  • }
  • }
  • rule("ON STATE 5: Loser Won't Spawn")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Is Game In Progress == True;
  • Event Player.PlayerState == 5;
  • }
  • actions
  • {
  • Wait(10, Abort When False);
  • Event Player.PlayerState = 6;
  • }
  • }
  • rule("ON STATE 6: Loser Spawned")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Is Game In Progress == True;
  • Event Player.PlayerState == 6;
  • Is Alive(Event Player) == True;
  • }
  • actions
  • {
  • Event Player.TempOpponent = Filtered Array(All Players(All Teams),
  • Event Player.ActiveDuelZone == Current Array Element.ActiveDuelZone && Event Player != Current Array Element);
  • Event Player.TempOpponent = First Of(Event Player.TempOpponent);
  • Enable Built-In Game Mode Respawning(Event Player.TempOpponent);
  • Event Player.PlayerState = 3;
  • Resurrect(Event Player.TempOpponent);
  • Event Player.TempOpponent.PlayerState = 3;
  • }
  • }
  • rule("ON: Lobby Player Dies")
  • {
  • event
  • {
  • Player Died;
  • All;
  • All;
  • }
  • conditions
  • {
  • Event Player.PlayerState <= 2;
  • }
  • actions
  • {
  • Event Player.PlayerState = 0;
  • Event Player.PlayerState = 1;
  • }
  • }
  • rule("ON: Player Spawns")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Has Spawned(Event Player) == True;
  • }
  • actions
  • {
  • Event Player.PlayerState = 1;
  • }
  • }
  • rule("ON: Run Matchmaker When Clock is 0")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Global.MatchmakerTicker == 0;
  • }
  • actions
  • {
  • Wait(1, Ignore Condition);
  • Global.TempWaitingPlayersList = Filtered Array(All Living Players(All Teams), Current Array Element.PlayerState == 2);
  • Abort If(Count Of(Global.TempWaitingPlayersList) < 2);
  • Global.TempWaitingPlayersList = Randomized Array(Global.TempWaitingPlayersList);
  • Global.TempWaitingPlayersList = Sorted Array(Global.TempWaitingPlayersList, (Score Of(Current Array Element) * 25 + (
  • Current Array Element.TimeSpentWaiting - Current Array Element.RepeatedOpponentCounter * 25)) * -1);
  • If(Random Real(0, 1000) > 500);
  • Global.TempPlayerOne = Global.TempWaitingPlayersList[0];
  • Global.TempPlayerTwo = Global.TempWaitingPlayersList[1];
  • Else;
  • Global.TempPlayerOne = Global.TempWaitingPlayersList[1];
  • Global.TempPlayerTwo = Global.TempWaitingPlayersList[0];
  • End;
  • Global.TempAvailableDuelZones = Empty Array;
  • Skip If(Count Of(Filtered Array(All Players(All Teams), Current Array Element.ActiveDuelZone == 0)) != 0, 1);
  • Modify Global Variable(TempAvailableDuelZones, Append To Array, 0);
  • Skip If(Count Of(Filtered Array(All Players(All Teams), Current Array Element.ActiveDuelZone == 1)) != 0, 1);
  • Modify Global Variable(TempAvailableDuelZones, Append To Array, 1);
  • Skip If(Count Of(Filtered Array(All Players(All Teams), Current Array Element.ActiveDuelZone == 2)) != 0, 1);
  • Modify Global Variable(TempAvailableDuelZones, Append To Array, 2);
  • Skip If(Count Of(Filtered Array(All Players(All Teams), Current Array Element.ActiveDuelZone == 3)) != 0, 1);
  • Modify Global Variable(TempAvailableDuelZones, Append To Array, 3);
  • Skip If(Count Of(Filtered Array(All Players(All Teams), Current Array Element.ActiveDuelZone == 4)) != 0, 1);
  • Modify Global Variable(TempAvailableDuelZones, Append To Array, 4);
  • Skip If(Count Of(Filtered Array(All Players(All Teams), Current Array Element.ActiveDuelZone == 5)) != 0, 1);
  • Modify Global Variable(TempAvailableDuelZones, Append To Array, 5);
  • Global.TempAvailableDuelZones = Random Value In Array(Global.TempAvailableDuelZones);
  • Global.TempPlayerOne.ActiveDuelZone = Global.TempAvailableDuelZones;
  • Global.TempPlayerTwo.ActiveDuelZone = Global.TempAvailableDuelZones;
  • Global.TempPlayerOne.PlayerState = 3;
  • Global.TempPlayerTwo.PlayerState = 3;
  • Global.TempPlayerOne.PlayerNumberOffset = 0;
  • Global.TempPlayerTwo.PlayerNumberOffset = 1;
  • Global.TempPlayerOne.EnemyPlayerNumberOffset = 1;
  • Global.TempPlayerTwo.EnemyPlayerNumberOffset = 0;
  • Global.TempHeroPool = Randomized Array(Allowed Heroes(Global.TempPlayerOne));
  • Global.HeroPoolArray[5 * Global.TempAvailableDuelZones + 0] = Global.TempHeroPool[0];
  • Global.HeroPoolArray[5 * Global.TempAvailableDuelZones + 1] = Global.TempHeroPool[1];
  • Global.HeroPoolArray[5 * Global.TempAvailableDuelZones + 2] = Global.TempHeroPool[2];
  • Global.HeroPoolArray[5 * Global.TempAvailableDuelZones + 3] = Global.TempHeroPool[3];
  • Global.HeroPoolArray[5 * Global.TempAvailableDuelZones + 4] = Global.TempHeroPool[4];
  • Global.TempPlayerOne.CurrentOpponent = Global.TempPlayerTwo;
  • Global.TempPlayerTwo.CurrentOpponent = Global.TempPlayerOne;
  • Loop If(Count Of(Global.TempWaitingPlayersList) >= 2);
  • }
  • }
  • rule("LOOP: Matchmaker Clock")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Global.MatchmakerTicker == 0;
  • }
  • actions
  • {
  • Global.MatchmakerTicker = Global.ConfigMatchmakerTimer;
  • Chase Global Variable At Rate(MatchmakerTicker, 0, 1, None);
  • }
  • }
  • rule("ON: Damaging Non-Opponent During Match")
  • {
  • event
  • {
  • Player Dealt Damage;
  • All;
  • All;
  • }
  • conditions
  • {
  • Victim.PlayerState > 2;
  • Victim != Event Player;
  • Event Player.ActiveDuelZone != Victim.ActiveDuelZone;
  • }
  • actions
  • {
  • Kill(Event Player, Null);
  • Big Message(Event Player, Custom String("NO GRIEFING"));
  • Modify Player Score(Event Player, -10);
  • }
  • }
  • rule("COLLIDE: Outside of Duel Zone")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Event Player.PlayerState >= 4;
  • Distance Between(Event Player, Global.DuelZonePositionList[Event Player.ActiveDuelZone])
  • >= Global.DuelZoneRadiusList[Event Player.ActiveDuelZone] - 1;
  • }
  • actions
  • {
  • Apply Impulse(Event Player, Direction Towards(Event Player, Global.DuelZonePositionList[Event Player.ActiveDuelZone]) * 1, 20,
  • To World, Cancel Contrary Motion);
  • Damage(Event Player, Null, 50);
  • Set Status(Event Player, Null, Burning, 1);
  • Wait(0.250, Ignore Condition);
  • Loop If Condition Is True;
  • }
  • }
  • rule("COLLIDE: Inside of Barrier")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Event Player.PlayerState >= 4;
  • Count Of(Filtered Array(Global.BarrierPositionList, Distance Between(Current Array Element, Event Player)
  • - 0.500 <= Global.BarrierRadiusList[Index Of Array Value(Global.BarrierPositionList, Current Array Element)])) > 0;
  • }
  • actions
  • {
  • Kill(Event Player, Null);
  • Big Message(Event Player, Custom String("OUT OF BOUNDS"));
  • }
  • }
  • rule("ON: Player Disconnected")
  • {
  • event
  • {
  • Player Left Match;
  • All;
  • All;
  • }
  • actions
  • {
  • Global.TempOrphanPlayers = Filtered Array(All Players(All Teams), Current Array Element.ActiveDuelZone == 0);
  • Skip If(Count Of(Global.TempOrphanPlayers) != 1, 3);
  • Set Player Score(Global.TempOrphanPlayers, Max(Min(Score Of(Global.TempOrphanPlayers) + 1, 5), 0));
  • Global.TempOrphanPlayers.PlayerState = 1;
  • Enable Built-In Game Mode Respawning(Global.TempOrphanPlayers);
  • Global.TempOrphanPlayers = Filtered Array(All Players(All Teams), Current Array Element.ActiveDuelZone == 1);
  • Skip If(Count Of(Global.TempOrphanPlayers) != 1, 3);
  • Set Player Score(Global.TempOrphanPlayers, Max(Min(Score Of(Global.TempOrphanPlayers) + 1, 5), 0));
  • Global.TempOrphanPlayers.PlayerState = 1;
  • Enable Built-In Game Mode Respawning(Global.TempOrphanPlayers);
  • Global.TempOrphanPlayers = Filtered Array(All Players(All Teams), Current Array Element.ActiveDuelZone == 2);
  • Skip If(Count Of(Global.TempOrphanPlayers) != 1, 3);
  • Set Player Score(Global.TempOrphanPlayers, Max(Min(Score Of(Global.TempOrphanPlayers) + 1, 5), 0));
  • Global.TempOrphanPlayers.PlayerState = 1;
  • Enable Built-In Game Mode Respawning(Global.TempOrphanPlayers);
  • Global.TempOrphanPlayers = Filtered Array(All Players(All Teams), Current Array Element.ActiveDuelZone == 3);
  • Skip If(Count Of(Global.TempOrphanPlayers) != 1, 3);
  • Set Player Score(Global.TempOrphanPlayers, Max(Min(Score Of(Global.TempOrphanPlayers) + 1, 5), 0));
  • Global.TempOrphanPlayers.PlayerState = 1;
  • Enable Built-In Game Mode Respawning(Global.TempOrphanPlayers);
  • Global.TempOrphanPlayers = Filtered Array(All Players(All Teams), Current Array Element.ActiveDuelZone == 4);
  • Skip If(Count Of(Global.TempOrphanPlayers) != 1, 3);
  • Set Player Score(Global.TempOrphanPlayers, Max(Min(Score Of(Global.TempOrphanPlayers) + 1, 5), 0));
  • Global.TempOrphanPlayers.PlayerState = 1;
  • Enable Built-In Game Mode Respawning(Global.TempOrphanPlayers);
  • Global.TempOrphanPlayers = Filtered Array(All Players(All Teams), Current Array Element.ActiveDuelZone == 5);
  • Skip If(Count Of(Global.TempOrphanPlayers) != 1, 3);
  • Set Player Score(Global.TempOrphanPlayers, Max(Min(Score Of(Global.TempOrphanPlayers) + 1, 5), 0));
  • Global.TempOrphanPlayers.PlayerState = 1;
  • Enable Built-In Game Mode Respawning(Global.TempOrphanPlayers);
  • }
  • }
  • rule("INIT: Create Spectate Zone Effects")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • actions
  • {
  • Create Effect(All Players(All Teams), Light Shaft, Aqua, Vector(-102, 3, -82), 2, Visible To Position and Radius);
  • Create In-World Text(All Players(All Teams), String("#{0}", 1), Vector(-102, 6, -82), 2, Clip Against Surfaces,
  • Visible To Position and String, White, Default Visibility);
  • Create In-World Text(All Players(All Teams), String("{0}: {1}", String("Players"), Count Of(Filtered Array(All Players(All Teams),
  • Current Array Element.ActiveDuelZone == 0))), Vector(-102, 5, -82), 1.500, Clip Against Surfaces, Visible To and String, White,
  • Default Visibility);
  • Create Effect(All Players(All Teams), Light Shaft, Aqua, Vector(-97, 3, -77), 2, Visible To Position and Radius);
  • Create In-World Text(All Players(All Teams), String("#{0}", 2), Vector(-97, 6, -77), 2, Clip Against Surfaces,
  • Visible To Position and String, White, Default Visibility);
  • Create In-World Text(All Players(All Teams), String("{0}: {1}", String("Players"), Count Of(Filtered Array(All Players(All Teams),
  • Current Array Element.ActiveDuelZone == 1))), Vector(-97, 5, -77), 1.500, Clip Against Surfaces, Visible To and String, White,
  • Default Visibility);
  • Create Effect(All Players(All Teams), Light Shaft, Aqua, Vector(-86, 9.500, -65), 2, Visible To Position and Radius);
  • Create In-World Text(All Players(All Teams), String("#{0}", 3), Vector(-86, 12, -65), 2, Clip Against Surfaces,
  • Visible To Position and String, White, Default Visibility);
  • Create In-World Text(All Players(All Teams), String("{0}: {1}", String("Players"), Count Of(Filtered Array(All Players(All Teams),
  • Current Array Element.ActiveDuelZone == 2))), Vector(-86, 11, -65), 1.500, Clip Against Surfaces, Visible To and String, White,
  • Default Visibility);
  • Create Effect(All Players(All Teams), Light Shaft, Aqua, Vector(-94, 9.500, -55), 2, Visible To Position and Radius);
  • Create In-World Text(All Players(All Teams), String("#{0}", 4), Vector(-94, 12, -55), 2, Clip Against Surfaces,
  • Visible To Position and String, White, Default Visibility);
  • Create In-World Text(All Players(All Teams), String("{0}: {1}", String("Players"), Count Of(Filtered Array(All Players(All Teams),
  • Current Array Element.ActiveDuelZone == 3))), Vector(-94, 11, -55), 1.500, Clip Against Surfaces, Visible To and String, White,
  • Default Visibility);
  • Create Effect(All Players(All Teams), Light Shaft, Aqua, Vector(-108.934, 3, -70.808), 2, Visible To Position and Radius);
  • Create In-World Text(All Players(All Teams), String("#{0}", 5), Vector(-108.934, 6, -70.808), 2, Clip Against Surfaces,
  • Visible To Position and String, White, Default Visibility);
  • Create In-World Text(All Players(All Teams), String("{0}: {1}", String("Players"), Count Of(Filtered Array(All Players(All Teams),
  • Current Array Element.ActiveDuelZone == 4))), Vector(-108.934, 5, -70.808), 1.500, Clip Against Surfaces,
  • Visible To and String, White, Default Visibility);
  • Create Effect(All Players(All Teams), Light Shaft, Aqua, Vector(-114, 3, -77), 2, Visible To Position and Radius);
  • Create In-World Text(All Players(All Teams), String("#{0}", 6), Vector(-114, 6, -77), 2, Clip Against Surfaces,
  • Visible To Position and String, White, Default Visibility);
  • Create In-World Text(All Players(All Teams), String("{0}: {1}", String("Players"), Count Of(Filtered Array(All Players(All Teams),
  • Current Array Element.ActiveDuelZone == 5))), Vector(-114, 5, -77), 1.500, Clip Against Surfaces, Visible To and String, White,
  • Default Visibility);
  • }
  • }
  • rule("ON: On Spectate Zone #1")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Distance Between(Event Player, Vector(-102, 5, -82)) <= 2;
  • Event Player.PlayerState == 2;
  • }
  • actions
  • {
  • Abort If(Is In Air(Event Player));
  • Start Camera(Event Player, Vector(-68, 15, -46), Vector(-68.321, 15, -46.540) + Facing Direction Of(Event Player), 10);
  • Set Facing(Event Player, Direction Towards(Vector(-68, 15, -46), Global.DuelZonePositionList[0]), To World);
  • Event Player.Spectating = Vector(-102, 5, -82);
  • Small Message(Event Player, Custom String("Jump or move to stop spectating"));
  • }
  • }
  • rule("ON: On Spectate Zone #2")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Distance Between(Event Player, Vector(-97, 5, -77)) <= 2;
  • Event Player.PlayerState == 2;
  • }
  • actions
  • {
  • Abort If(Is In Air(Event Player));
  • Start Camera(Event Player, Vector(-6.753, 8, -58.626), Vector(-6.753, 8, -58.626) + Facing Direction Of(Event Player), 10);
  • Set Facing(Event Player, Direction Towards(Vector(-68, 15, -46), Global.DuelZonePositionList[1]), To World);
  • Event Player.Spectating = Vector(-97, 5, -77);
  • Small Message(Event Player, Custom String("Jump or move to stop spectating"));
  • }
  • }
  • rule("ON: On Spectate Zone #3")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Distance Between(Event Player, Vector(-86, 11, -65)) <= 2;
  • Event Player.PlayerState == 2;
  • }
  • actions
  • {
  • Abort If(Is In Air(Event Player));
  • Start Camera(Event Player, Vector(32.976, 19.508, -74.900), Vector(32.976, 19.508, -74.900) + Facing Direction Of(Event Player),
  • 10);
  • Set Facing(Event Player, Direction Towards(Vector(-86, 11, -65), Global.DuelZonePositionList[2]), To World);
  • Event Player.Spectating = Vector(-86, 11, -65);
  • Small Message(Event Player, Custom String("Jump or move to stop spectating"));
  • }
  • }
  • rule("ON: On Spectate Zone #4")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Distance Between(Event Player, Vector(-94, 11, -55)) <= 2;
  • Event Player.PlayerState == 2;
  • }
  • actions
  • {
  • Abort If(Is In Air(Event Player));
  • Start Camera(Event Player, Vector(98.003, 19, -72.840), Vector(98.003, 19, -72.840) + Facing Direction Of(Event Player), 10);
  • Set Facing(Event Player, Direction Towards(Vector(98.003, 19, -72.840), Global.DuelZonePositionList[3]), To World);
  • Event Player.Spectating = Vector(-94, 11, -55);
  • Small Message(Event Player, Custom String("Jump or move to stop spectating"));
  • }
  • }
  • rule("ON: On Spectate Zone #5")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Distance Between(Event Player, Vector(-108.934, 5, -70.808)) <= 2;
  • Event Player.PlayerState == 2;
  • }
  • actions
  • {
  • Abort If(Is In Air(Event Player));
  • Start Camera(Event Player, Vector(124.410, 15.910, -46.384), Vector(124.410, 15.910, -46.384) + Facing Direction Of(Event Player),
  • 10);
  • Set Facing(Event Player, Direction Towards(Vector(124.410, 15.910, -46.384), Global.DuelZonePositionList[4]), To World);
  • Event Player.Spectating = Vector(-108.934, 5, -70.808);
  • Small Message(Event Player, Custom String("Jump or move to stop spectating"));
  • }
  • }
  • rule("ON: On Spectate Zone #6")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Distance Between(Event Player, Vector(-114, 5, -77)) <= 2;
  • Event Player.PlayerState == 2;
  • }
  • actions
  • {
  • Abort If(Is In Air(Event Player));
  • Start Camera(Event Player, Vector(227.511, 36, -40.406), Vector(227.511, 36, -40.406) + Facing Direction Of(Event Player), 10);
  • Set Facing(Event Player, Direction Towards(Vector(227.511, 36, -40.406), Global.DuelZonePositionList[5]), To World);
  • Event Player.Spectating = Vector(-114, 5, -77);
  • Small Message(Event Player, Custom String("Jump or move to stop spectating"));
  • }
  • }
  • rule("ON: Finished Spectating")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Event Player.Spectating != Null;
  • disabled Distance Between(Event Player.Spectating, Position Of(Event Player)) > 2;
  • (Distance Between(Event Player.Spectating, Position Of(Event Player)) > 2 || Is In Air(Event Player)) == True;
  • }
  • actions
  • {
  • Stop Camera(Event Player);
  • Event Player.Spectating = Null;
  • }
  • }
  • rule("ON: Entered AFK Room")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Is In Spawn Room(Event Player) == False;
  • Event Player.PlayerState == 2;
  • Distance Between(Vector(-90.622, 5.176, -61.049), Event Player) < 13;
  • }
  • actions
  • {
  • Small Message(Event Player, Custom String("AFK MODE ENABLED"));
  • Event Player.PlayerState = -4;
  • Set Status(Event Player, Null, Phased Out, 9999);
  • }
  • }
  • rule("ON: Exit AFK Room")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Event Player.PlayerState == -4;
  • Is In Spawn Room(Event Player) == True;
  • }
  • actions
  • {
  • Small Message(Event Player, Custom String("AFK MODE DISABLED"));
  • Event Player.PlayerState = 2;
  • }
  • }
Join the Workshop.codes Discord