Description: "The classic Hide & Seek game has returned as a new and improved workshop gamemode! A new additional level of customization is offered to hosts through Workshop Settings; make everyone small, change the time for each phase, or even how the game plays with different game styles\n[Created by CaptCaptain#11421] [For the latest code, visit: https://workshop.codes/hide-and-seek-ult]"
}
lobby
{
Match Voice Chat: Enabled
Max Spectators: 12
Map Rotation: After A Game
Return To Lobby: Never
Team Balancing: After A Game
Max Team 1 Players: 9
Max Team 2 Players: 3
}
modes
{
Skirmish
{
disabled maps
{
Workshop Island
Workshop Island Night
Workshop Chamber
Workshop Green Screen
Workshop Expanse
Workshop Expanse Night
}
}
Team Deathmatch
{
enabled maps
{
Castillo
Château Guillard
Kanezaka
Ecopoint: Antarctica
Ecopoint: Antarctica Winter
Necropolis
Petra
Black Forest
Black Forest Winter
}
}
Capture The Flag
{
enabled maps
{
Ayutthaya
Busan Downtown Lunar New Year
Busan Sanctuary Lunar New Year
}
}
General
{
Hero Limit: Off
Respawn As Random Hero: Off
Spawn Health Packs: Disabled
Game Mode Start: Immediately
Flag Pickup Time: 5
}
}
heroes
{
General
{
Ultimate Ability: Off
Ultimate Generation - Combat: 0%
Ultimate Generation - Passive: 0%
D.Va
{
Spawn With Ultimate Ready: On
}
}
Team 2
{
Ability Cooldown Time: 50%
}
}
}
variables {
global:
0: practiceRangeTranslations
1: CURRENT_VERSION
2: WS_SET_USEOUTLINE
3: WS_SET_HIDETIME_RAW
4: WS_SET_HIDETIME
5: WS_SET_SEEKTIME_RAW
6: WS_SET_SEEKTIME
7: WS_SET_MODE_RAW
8: WS_SET_MODE
9: WS_SET_REQUIRED_RATIO
10: WS_SET_REQUIRED_HIDERS
11: WS_SET_WAITING_MAXTIME_RAW
12: WS_SET_WAITING_MAXTIME
13: WS_SET_SLOWHIDER
14: WS_SET_SEEKER_OUTLINES_RAW
15: WS_SET_SEEKER_OUTLINES
16: WS_SET_SHOW_HIDERS_RAW
17: WS_SET_SHOW_HIDERS
18: WS_SET_END_RAW
19: WS_SET_END
20: WS_SET_3RD_CAM_RAW
21: WS_SET_3RD_CAM
22: WS_SET_SEEKER_ASSIST
23: WS_SET_LAYING_DOWN
24: WS_SET_USE_SLINGSHOT
25: WS_SET_ADV_DVA_MECH_RAW
26: WS_SET_ADV_DVA_MECH
27: WS_SET_ADV_INF_HAMMOND_GRAPPLE
28: WS_SET_ADV_TANKSCALING_RAW
29: WS_SET_ADV_TANKSCALING
30: WS_SET_ADV_WINS_RAW
31: WS_SET_ADV_WINS
32: WS_SET_ADV_SCALE
33: WS_SET_ADV_SEEK_ALLOWH
34: WS_SET_ADV_BASESPEED
35: WS_SET_ADV_DEBUGSTATS_RAW
36: WS_SET_ADV_DEBUGSTATS
37: CurrentGameState
38: CurrentTime
39: CurrentRound
40: HiderTeamScore
41: SeekerTeamScore
42: LastHiderHud
43: playerIndex
44: globalHudIndex
45: Hud_GameInfo
46: Hud_GameTitle
47: Hud_Seeker_Blindness
player:
0: ShowHiders
1: JoinedLate
2: playerHudIndex
3: playerIndex
4: Hud_Player
5: BaseMoveSpeed
6: BaseJumpHeight
7: BaseScaling
8: HiderSlowFactor
9: DvaMechPosition
10: DvaHasTeleported
11: LastWalkablePosition
12: ResurrectBlocked
13: CameraState
14: ThirdPersonCameraEnabled
15: LayingDownCameraEnabled
16: SlingshotPosition
17: SlingshotEnabled
18: SlingshotUsed
19: Hud_Slingshot
20: PreviousPosition
21: Hud_Detection
22: Hud_InSpawn
23: Huds_JoinedLate
24: Effects_SombraInvis
25: Hud_SombraTrans
26: Hud_Seeker_Name
27: Hud_Seeker_Assistance
28: Effect_Seeker_Blindness
}
subroutines {
0: PLAYSOUND_DEBUFF
1: PLAYSOUND_RINGEXPLOSION
2: PLAYSOUND_BUFF
3: StartThirdPersonCamera
4: StartCamera
5: SlingshotCooldown
6: RestrictAbilities
}
rule ("Initialize global variables") {
event {
Ongoing - Global;
}
actions {
Set Global Variable(practiceRangeTranslations, Array(Custom String("Practice Range", Null, Null, Null)));
Set Global Variable(CURRENT_VERSION, Custom String("2.1.0", Null, Null, Null));
Set Global Variable(WS_SET_USEOUTLINE, Workshop Setting Toggle(Custom String("Ruleset", Null, Null, Null), Custom String("Hider Outlines", Null, Null, Null), False, 4));
Set Global Variable(WS_SET_REQUIRED_HIDERS, Value In Array(Array(3, 2, 1), Global.WS_SET_REQUIRED_RATIO));
Set Global Variable(WS_SET_WAITING_MAXTIME_RAW, Workshop Setting Combo(Custom String("Ruleset", Null, Null, Null), Custom String("Game Mode Start", Null, Null, Null), 1, Array(Custom String("IMMEDIATELY", Null, Null, Null), Custom String("Wait For Players (Timeout)", Null, Null, Null), Custom String("Wait For Players (No Timeout)", Null, Null, Null)), 1));
Set Global Variable(WS_SET_WAITING_MAXTIME, Value In Array(Array(0, 5, 9999), Global.WS_SET_WAITING_MAXTIME_RAW));
Set Global Variable(WS_SET_SLOWHIDER, Workshop Setting Toggle(Custom String("Ruleset", Null, Null, Null), Custom String("Slow Hider When In Line Of Sight Of Seeker", Null, Null, Null), True, 4));
Set Global Variable(WS_SET_ADV_DEBUGSTATS, Value In Array(Array(1, 0, 2), Global.WS_SET_ADV_DEBUGSTATS_RAW));
Set Global Variable(CurrentGameState, 0);
Set Global Variable(CurrentTime, 1800);
Set Global Variable(CurrentRound, 0);
Set Global Variable(HiderTeamScore, 0);
Set Global Variable(SeekerTeamScore, 0);
Set Global Variable(globalHudIndex, 0);
}
}
rule ("Initialize player variables") {
event {
Ongoing - Each Player;
All;
All;
}
actions {
Set Player Variable(Event Player, ShowHiders, False);
Set Player Variable(Event Player, playerHudIndex, 0);
Set Player Variable(Event Player, playerIndex, 0);
Set Player Variable(Event Player, BaseMoveSpeed, Multiply(100, Global.WS_SET_ADV_BASESPEED));
Set Player Variable(Event Player, BaseJumpHeight, Multiply(100, Global.WS_SET_ADV_BASESPEED));
Set Player Variable(Event Player, BaseScaling, Global.WS_SET_ADV_SCALE);
Set Player Variable(Event Player, HiderSlowFactor, 2);
Set Player Variable(Event Player, CameraState, If-Then-Else(Compare(Global.WS_SET_3RD_CAM, ==, 6), 2, 0));
Set Player Variable(Event Player, ThirdPersonCameraEnabled, If-Then-Else(Compare(Global.WS_SET_3RD_CAM, ==, 6), True, False));
Set Player Variable(Event Player, LayingDownCameraEnabled, False);
Set Player Variable(Event Player, SlingshotEnabled, False);
Set Player Variable(Event Player, SlingshotUsed, False);
Set Player Variable(Event Player, Hud_Slingshot, Empty Array);
}
}
rule ("____________Shared Rules") {
event {
Ongoing - Global;
}
}
rule ("Subroutine PLAYSOUND_RINGEXPLOSION") {
event {
Subroutine;
PLAYSOUND_RINGEXPLOSION;
}
actions {
For Global Variable(playerIndex, 0, Number Of Players(All Teams), 1);
Play Effect(Value In Array(All Players(All Teams), Global.playerIndex), Ring Explosion Sound, Color(White), Value In Array(All Players(All Teams), Global.playerIndex), 100);
End;
}
}
rule ("Subroutine PLAYSOUND_DEBUFF") {
event {
Subroutine;
PLAYSOUND_DEBUFF;
}
actions {
For Global Variable(playerIndex, 0, Number Of Players(All Teams), 1);
Play Effect(Value In Array(All Players(All Teams), Global.playerIndex), Debuff Impact Sound, Color(White), Value In Array(All Players(All Teams), Global.playerIndex), 100);
End;
}
}
rule ("Subroutine PLAYSOUND_BUFF") {
event {
Subroutine;
PLAYSOUND_BUFF;
}
actions {
For Global Variable(playerIndex, 0, Number Of Players(All Teams), 1);
Play Effect(Value In Array(All Players(All Teams), Global.playerIndex), Buff Explosion Sound, Color(White), Value In Array(All Players(All Teams), Global.playerIndex), 100);
Big Message(If-Then-Else(Compare(Global.WS_SET_ADV_WINS, >, 1), All Players(All Teams), Null), Custom String("Hiders Win!", Null, Null, Null));
Else;
Modify Global Variable(SeekerTeamScore, Add, 1);
Big Message(If-Then-Else(Compare(Global.WS_SET_ADV_WINS, >, 1), All Players(All Teams), Null), Custom String("Seekers Win!", Null, Null, Null));
End;
"Show hiders if workshop setting is enabled"
If(Or(And(Compare(Global.WS_SET_SHOW_HIDERS, ==, 1), Compare(Number Of Living Players(Team 1), >=, 1)), And(Compare(Global.WS_SET_SHOW_HIDERS, ==, 0), Compare(Number Of Living Players(Team 1), ==, 1))));
Small Message(All Players(All Teams), Value In Array(Array(Custom String("Revealing the remaining hiders", Null, Null, Null)), Max(False, Index Of Array Value(Global.practiceRangeTranslations, Custom String("{0}", Map(Practice Range), Null, Null)))));
Set Player Variable(All Players(All Teams), ShowHiders, True);
Create HUD Text(Event Player, Null, Custom String("[{0}]: {1} / [{2}", Input Binding String(Button(Interact)), Value In Array(Array(Custom String("Toggle Slingshot", Null, Null, Null)), Max(False, Index Of Array Value(Global.practiceRangeTranslations, Custom String("{0}", Map(Practice Range), Null, Null)))), Custom String("{0}]: {1}", Input Binding String(Button(Primary Fire)), Value In Array(Array(Custom String("Confirm", Null, Null, Null)), Max(False, Index Of Array Value(Global.practiceRangeTranslations, Custom String("{0}", Map(Practice Range), Null, Null)))), Null)), Null, Top, 0, Null, Color(White), Null, Visible To and String, Default Visibility);
Modify Player Variable(Event Player, Hud_Player, Append To Array, Last Text ID);
End;
"Camera Hud Instructions"
If(Compare(Global.WS_SET_3RD_CAM, ==, 8));
Create HUD Text(Event Player, Null, Custom String("[{0}]: {1}", Input Binding String(Button(Reload)), Value In Array(Array(Custom String("Toggle third person camera", Null, Null, Null)), Max(False, Index Of Array Value(Global.practiceRangeTranslations, Custom String("{0}", Map(Practice Range), Null, Null)))), Null), Null, Top, 0, Null, Color(White), Null, Visible To and String, Default Visibility);
Modify Player Variable(Event Player, Hud_Player, Append To Array, Last Text ID);
End;
"Laying down Instructions"
If(And(Compare(Global.WS_SET_LAYING_DOWN, ==, True), Compare(Team Of(Event Player), ==, Team 1)));
Create HUD Text(Event Player, Null, Custom String("[{0} + {1}]: {2}", Value In Array(Array(Custom String("Emote", Null, Null, Null)), Max(False, Index Of Array Value(Global.practiceRangeTranslations, Custom String("{0}", Map(Practice Range), Null, Null)))), Input Binding String(Button(Crouch)), Custom String("{0} / [{1}]: {2}", Value In Array(Array(Custom String("Lay Down", Null, Null, Null)), Max(False, Index Of Array Value(Global.practiceRangeTranslations, Custom String("{0}", Map(Practice Range), Null, Null)))), Input Binding String(Button(Jump)), Value In Array(Array(Custom String("Stand up", Null, Null, Null)), Max(False, Index Of Array Value(Global.practiceRangeTranslations, Custom String("{0}", Map(Practice Range), Null, Null)))))), Null, Top, 0, Null, Color(White), Null, Visible To and String, Default Visibility);
Modify Player Variable(Event Player, Hud_Player, Append To Array, Last Text ID);
}
}
rule ("Global Huds") {
event {
Ongoing - Global;
}
conditions {
Global.CurrentGameState == 1;
}
actions {
Create HUD Text(All Players(All Teams), Null, Value In Array(Array(Custom String("Current Version: {0}\n", Global.CURRENT_VERSION, Null, Null)), Max(False, Index Of Array Value(Global.practiceRangeTranslations, Custom String("{0}", Map(Practice Range), Null, Null)))), Null, Right, 0, Null, Color(White), Null, Visible To and Sort Order, Default Visibility);
Modify Global Variable(Hud_GameInfo, Append To Array, Last Text ID);
Create HUD Text(All Players(All Teams), Null, Value In Array(Array(Custom String("https://workshop.codes/hide-and-seek-ult", Null, Null, Null)), Max(False, Index Of Array Value(Global.practiceRangeTranslations, Custom String("{0}", Map(Practice Range), Null, Null)))), Null, Right, 0, Null, Color(White), Null, Visible To and Sort Order, Default Visibility);
Modify Global Variable(Hud_GameInfo, Append To Array, Last Text ID);
Create HUD Text(All Players(All Teams), Null, Null, Value In Array(Array(Custom String("{0} Hide & Seek: Ultimate by CaptCaptain#11421", Ability Icon String(Random Value In Array(All Heroes), Button(Ultimate)), Null, Null)), Max(False, Index Of Array Value(Global.practiceRangeTranslations, Custom String("{0}", Map(Practice Range), Null, Null)))), Right, 0, Null, Null, Color(Sky Blue), Visible To and Sort Order, Default Visibility);
Modify Global Variable(Hud_GameInfo, Append To Array, Last Text ID);
Create HUD Text(All Players(All Teams), Value In Array(Array(Custom String("{0} RULESET", Ability Icon String(Hero(Torbjörn), Button(Ability 2)), Null, Null)), Max(False, Index Of Array Value(Global.practiceRangeTranslations, Custom String("{0}", Map(Practice Range), Null, Null)))), Null, Null, Left, 1, Color(Rose), Null, Null, Visible To and Sort Order, Default Visibility);
Modify Global Variable(Hud_GameInfo, Append To Array, Last Text ID);
Create HUD Text(All Players(All Teams), Null, Null, Value In Array(Array(Custom String("STYLE: {0}", Value In Array(Array(Value In Array(Array(Custom String("DEFAULT", Null, Null, Null)), Max(False, Index Of Array Value(Global.practiceRangeTranslations, Custom String("{0}", Map(Practice Range), Null, Null)))), Value In Array(Array(Custom String("GLITCH", Null, Null, Null)), Max(False, Index Of Array Value(Global.practiceRangeTranslations, Custom String("{0}", Map(Practice Range), Null, Null)))), Value In Array(Array(Custom String("TINY", Null, Null, Null)), Max(False, Index Of Array Value(Global.practiceRangeTranslations, Custom String("{0}", Map(Practice Range), Null, Null)))), Value In Array(Array(Custom String("MERCY VS. REINHARDT", Null, Null, Null)), Max(False, Index Of Array Value(Global.practiceRangeTranslations, Custom String("{0}", Map(Practice Range), Null, Null))))), Global.WS_SET_MODE_RAW), Null, Null)), Max(False, Index Of Array Value(Global.practiceRangeTranslations, Custom String("{0}", Map(Practice Range), Null, Null)))), Left, 2, Null, Null, Color(White), Visible To and Sort Order, Default Visibility);
Modify Global Variable(Hud_GameInfo, Append To Array, Last Text ID);
Create HUD Text(All Players(All Teams), Null, Null, Value In Array(Array(Custom String("MAP: {0} [{1}]", Current Map, Current Game Mode, Null)), Max(False, Index Of Array Value(Global.practiceRangeTranslations, Custom String("{0}", Map(Practice Range), Null, Null)))), Left, 2, Null, Null, Color(White), Visible To and Sort Order, Default Visibility);
Modify Global Variable(Hud_GameInfo, Append To Array, Last Text ID);
Create HUD Text(All Players(All Teams), Null, Null, Value In Array(Array(Custom String("FIRST TEAM TO: {0} WIN(S)", Global.WS_SET_ADV_WINS, Null, Null)), Max(False, Index Of Array Value(Global.practiceRangeTranslations, Custom String("{0}", Map(Practice Range), Null, Null)))), Left, 3, Null, Null, Color(White), Visible To and Sort Order, Default Visibility);
Modify Global Variable(Hud_GameInfo, Append To Array, Last Text ID);
Create HUD Text(All Players(All Teams), Null, Null, Value In Array(Array(Custom String("TIME LIMIT - SEEKING: {0}:{1}", Round To Integer(Divide(Modulo(Modulo(Global.WS_SET_SEEKTIME, 86400), 3600), 60), Down), Round To Integer(Modulo(Modulo(Modulo(Global.WS_SET_SEEKTIME, 86400), 3600), 60), Down), Null)), Max(False, Index Of Array Value(Global.practiceRangeTranslations, Custom String("{0}", Map(Practice Range), Null, Null)))), Left, 4, Null, Null, Color(White), Visible To and Sort Order, Default Visibility);
Modify Global Variable(Hud_GameInfo, Append To Array, Last Text ID);
Create HUD Text(All Players(All Teams), Null, Null, Value In Array(Array(Custom String("TIME LIMIT - HIDING: {0}:{1}", Round To Integer(Divide(Modulo(Modulo(Global.WS_SET_HIDETIME, 86400), 3600), 60), Down), Round To Integer(Modulo(Modulo(Modulo(Global.WS_SET_HIDETIME, 86400), 3600), 60), Down), Null)), Max(False, Index Of Array Value(Global.practiceRangeTranslations, Custom String("{0}", Map(Practice Range), Null, Null)))), Left, 4, Null, Null, Color(White), Visible To and Sort Order, Default Visibility);
Modify Global Variable(Hud_GameInfo, Append To Array, Last Text ID);
Create HUD Text(All Players(All Teams), Null, Null, Value In Array(Array(Custom String("PLAYER SIZE: {0}x", Global.WS_SET_ADV_SCALE, Null, Null)), Max(False, Index Of Array Value(Global.practiceRangeTranslations, Custom String("{0}", Map(Practice Range), Null, Null)))), Left, 4, Null, Null, Color(White), Visible To and Sort Order, Default Visibility);
Modify Global Variable(Hud_GameInfo, Append To Array, Last Text ID);
Create HUD Text(All Players(All Teams), Null, Null, Value In Array(Array(Custom String("PLAYER SPEED: {0}x", Global.WS_SET_ADV_BASESPEED, Null, Null)), Max(False, Index Of Array Value(Global.practiceRangeTranslations, Custom String("{0}", Map(Practice Range), Null, Null)))), Left, 4, Null, Null, Color(White), Visible To and Sort Order, Default Visibility);
Modify Global Variable(Hud_GameInfo, Append To Array, Last Text ID);
Create HUD Text(All Players(All Teams), Null, Null, Value In Array(Array(Custom String("HIDER TANK SCALING: {0}", If-Then-Else(Compare(Global.WS_SET_ADV_TANKSCALING, ==, 4), Value In Array(Array(Custom String("Automatic", Null, Null, Null)), Max(False, Index Of Array Value(Global.practiceRangeTranslations, Custom String("{0}", Map(Practice Range), Null, Null)))), If-Then-Else(Compare(Global.WS_SET_ADV_TANKSCALING, ==, 3), True, False)), Null, Null)), Max(False, Index Of Array Value(Global.practiceRangeTranslations, Custom String("{0}", Map(Practice Range), Null, Null)))), Left, 5, Null, Null, Color(White), Visible To and Sort Order, Default Visibility);
Modify Global Variable(Hud_GameInfo, Append To Array, Last Text ID);
End;
If(Global.WS_SET_USE_SLINGSHOT);
Create HUD Text(All Players(All Teams), Null, Null, Value In Array(Array(Custom String("ALLOW SLINGSHOT TOOL: {0}", Global.WS_SET_USE_SLINGSHOT, Null, Null)), Max(False, Index Of Array Value(Global.practiceRangeTranslations, Custom String("{0}", Map(Practice Range), Null, Null)))), Left, 5, Null, Null, Color(White), Visible To and Sort Order, Default Visibility);
Modify Global Variable(Hud_GameInfo, Append To Array, Last Text ID);
End;
If(Compare(Global.WS_SET_SLOWHIDER, ==, True));
Create HUD Text(All Players(All Teams), Null, Null, Value In Array(Array(Custom String("SLOW HIDERS WHEN IN LOS OF SEEKER: {0}", Global.WS_SET_SLOWHIDER, Null, Null)), Max(False, Index Of Array Value(Global.practiceRangeTranslations, Custom String("{0}", Map(Practice Range), Null, Null)))), Left, 5, Null, Null, Color(White), Visible To and Sort Order, Default Visibility);
Modify Global Variable(Hud_GameInfo, Append To Array, Last Text ID);
End;
If(Global.WS_SET_LAYING_DOWN);
Create HUD Text(All Players(All Teams), Null, Null, Value In Array(Array(Custom String("ALLOW HIDERS TO LAY DOWN: {0}", Global.WS_SET_LAYING_DOWN, Null, Null)), Max(False, Index Of Array Value(Global.practiceRangeTranslations, Custom String("{0}", Map(Practice Range), Null, Null)))), Left, 5, Null, Null, Color(White), Visible To and Sort Order, Default Visibility);
Modify Global Variable(Hud_GameInfo, Append To Array, Last Text ID);
End;
If(Compare(Global.WS_SET_SHOW_HIDERS, !=, 2));
Create HUD Text(All Players(All Teams), Null, Null, Value In Array(Array(Custom String("SHOW REMAINING HIDERS AFTER THE ROUND: {0}", If-Then-Else(Compare(Global.WS_SET_SHOW_HIDERS, ==, 0), Value In Array(Array(Custom String("Last Hider Only", Null, Null, Null)), Max(False, Index Of Array Value(Global.practiceRangeTranslations, Custom String("{0}", Map(Practice Range), Null, Null)))), If-Then-Else(Compare(Global.WS_SET_SHOW_HIDERS, ==, 1), True, False)), Null, Null)), Max(False, Index Of Array Value(Global.practiceRangeTranslations, Custom String("{0}", Map(Practice Range), Null, Null)))), Left, 5.1, Null, Null, Color(White), Visible To and Sort Order, Default Visibility);
Modify Global Variable(Hud_GameInfo, Append To Array, Last Text ID);
Create HUD Text(All Players(All Teams), Null, Null, Value In Array(Array(Custom String("RESTRICT SEEKER HERO ROSTER: {0}", Not(Global.WS_SET_ADV_SEEK_ALLOWH), Null, Null)), Max(False, Index Of Array Value(Global.practiceRangeTranslations, Custom String("{0}", Map(Practice Range), Null, Null)))), Left, 5, Null, Null, Color(White), Visible To and Sort Order, Default Visibility);
Modify Global Variable(Hud_GameInfo, Append To Array, Last Text ID);
End;
Create HUD Text(All Players(All Teams), Null, Value In Array(Array(Custom String("TO CUSTOMIZE RULESET (HOST ONLY):\nGO TO LOBBY > SETTINGS > WORKSHOP SETTINGS", Null, Null, Null)), Max(False, Index Of Array Value(Global.practiceRangeTranslations, Custom String("{0}", Map(Practice Range), Null, Null)))), Null, Left, 6, Null, Color(Turquoise), Null, Visible To and Sort Order, Default Visibility);
Modify Global Variable(Hud_GameInfo, Append To Array, Last Text ID);
Create HUD Text(All Players(All Teams), Null, Value In Array(Array(Custom String("MATCH VOICE CHAT IS ENABLED", Null, Null, Null)), Max(False, Index Of Array Value(Global.practiceRangeTranslations, Custom String("{0}", Map(Practice Range), Null, Null)))), Null, Left, 6, Null, Color(Yellow), Null, Visible To and Sort Order, Default Visibility);
Modify Global Variable(Hud_GameInfo, Append To Array, Last Text ID);
Create HUD Text(All Players(All Teams), Null, Value In Array(Array(Custom String("FOR MORE INFORMATION ON RULESET:\nGO TO LOBBY > RIGHT CLICK MAP PICTURE > SCROLL DOWN TO WORKSHOP\n", Null, Null, Null)), Max(False, Index Of Array Value(Global.practiceRangeTranslations, Custom String("{0}", Map(Practice Range), Null, Null)))), Null, Left, 7, Null, Color(Turquoise), Null, Visible To and Sort Order, Default Visibility);
Modify Global Variable(Hud_GameInfo, Append To Array, Last Text ID);
If(Compare(Global.WS_SET_ADV_WINS, >, 1));
Create HUD Text(All Players(All Teams), Value In Array(Array(Custom String("TEAM SCORE:", Null, Null, Null)), Max(False, Index Of Array Value(Global.practiceRangeTranslations, Custom String("{0}", Map(Practice Range), Null, Null)))), Custom String("", Null, Null, Null), Value In Array(Array(Custom String("HIDERS: {0}\nSEEKERS: {1}", Global.HiderTeamScore, Global.SeekerTeamScore, Null)), Max(False, Index Of Array Value(Global.practiceRangeTranslations, Custom String("{0}", Map(Practice Range), Null, Null)))), Left, 8, Color(Team 1), Color(White), Color(White), Visible To and Sort Order, Default Visibility);
Modify Global Variable(Hud_GameInfo, Append To Array, Last Text ID);
}
}
rule ("Remove Global Huds") {
event {
Ongoing - Global;
}
conditions {
Global.CurrentGameState == 2;
}
actions {
For Global Variable(globalHudIndex, 0, Count Of(Global.Hud_GameInfo), 1);
Destroy HUD Text(Value In Array(Global.Hud_GameInfo, Global.globalHudIndex));
End;
Set Global Variable(Hud_GameInfo, Null);
}
}
rule ("Player Setup") {
event {
Ongoing - Each Player;
All;
All;
}
actions {
Disable Game Mode HUD(Event Player);
Disable Built-In Game Mode Respawning(Event Player);
Stop Camera(Event Player);
Set Move Speed(Event Player, (Event Player).BaseMoveSpeed);
Set Jump Vertical Speed(Event Player, (Event Player).BaseJumpHeight);
"Glitch Mode"
If(Compare(Global.WS_SET_MODE, ==, 4));
Disable Movement Collision With Environment(Event Player, False);
Small Message(Event Player, Value In Array(Array(Custom String("BE CAREFUL!", Null, Null, Null)), Max(False, Index Of Array Value(Global.practiceRangeTranslations, Custom String("{0}", Map(Practice Range), Null, Null)))));
}
}
rule ("Set Last Walkable Position") {
event {
Ongoing - Each Player;
All;
All;
}
conditions {
Is Moving(Event Player) == True;
Is On Ground(Event Player) == True;
}
actions {
Set Player Variable(Event Player, LastWalkablePosition, Nearest Walkable Position(Position Of(Event Player)));
For Player Variable(Event Player, playerIndex, 0, Number Of Living Players(Team 1), 1);
Start Camera(Event Player, Ray Cast Hit Position(Position Of(Value In Array(All Living Players(Team 1), (Event Player).playerIndex)), Add(Add(Position Of(Value In Array(All Living Players(Team 1), (Event Player).playerIndex)), Multiply(Up, 5)), Vector(0.001, 0, 0)), Null, Value In Array(All Living Players(Team 1), (Event Player).playerIndex), False), Position Of(Value In Array(All Living Players(Team 1), (Event Player).playerIndex)), 10);
Wait(2, Ignore Condition);
Start Camera(Event Player, Evaluate Once(Add(Add(Position Of(Value In Array(All Living Players(Team 1), (Event Player).playerIndex)), Multiply(Up, 100)), Backward)), Evaluate Once(Position Of(Value In Array(All Living Players(Team 1), (Event Player).playerIndex))), 5);
Is Button Held(Event Player, Button(Reload)) == True;
Ammo(Event Player, 0) == Max Ammo(Event Player, 0);
}
actions {
Set Player Variable(Event Player, ThirdPersonCameraEnabled, Not((Event Player).ThirdPersonCameraEnabled));
Set Player Variable(Event Player, CameraState, If-Then-Else((Event Player).ThirdPersonCameraEnabled, 2, 0));
}
}
rule ("Toggle Slingshot") {
event {
Ongoing - Each Player;
All;
All;
}
conditions {
Global.WS_SET_USE_SLINGSHOT == True;
Is Button Held(Event Player, Button(Interact)) == True;
}
actions {
Wait(0.016, Ignore Condition);
If(And(And(Global.WS_SET_SLOWHIDER, Is True For Any(All Players(Team 2), Is In Line of Sight(Event Player, Current Array Element, Barriers Do Not Block LOS))), Compare(Team Of(Event Player), ==, Team 1)));
Small Message(Event Player, Value In Array(Array(Custom String("CANNOT USE SLINGSHOT WHILE IN LOS OF SEEKERS", Null, Null, Null)), Max(False, Index Of Array Value(Global.practiceRangeTranslations, Custom String("{0}", Map(Practice Range), Null, Null)))));
Abort;
"Using interact with abilities take priority over slingshot toggle"
Else If(Is True For Any(Array(And(Compare(Hero Of(Event Player), ==, Hero(Sombra)), Is Using Ability 2(Event Player)), And(Compare(Hero Of(Event Player), ==, Hero(Torbjörn)), Is Using Ability 1(Event Player)), And(Compare(Distance Between(Position Of(Event Player), (Event Player).PreviousPosition), >, 1), Is True For Any(Players On Hero(Hero(Symmetra), Team Of(Event Player)), Is Using Ability 2(Current Array Element)))), Compare(Current Array Element, ==, True)));
Abort;
End;
Set Player Variable(Event Player, SlingshotEnabled, Not((Event Player).SlingshotEnabled));
}
}
rule ("Disable Slingshot") {
event {
Ongoing - Each Player;
All;
All;
}
conditions {
Is Communicating Any Emote(Event Player) == True;
}
actions {
Set Player Variable(Event Player, SlingshotEnabled, False);
}
}
rule ("Create Slingshot Effects") {
event {
Ongoing - Each Player;
All;
All;
}
conditions {
(Event Player).SlingshotEnabled == True;
}
actions {
Play Effect(Event Player, Good Explosion, If-Then-Else((Event Player).SlingshotUsed, Color(Rose), Color(Yellow)), Update Every Frame(Ray Cast Hit Position(Add(Ray Cast Hit Position(Eye Position(Event Player), Add(Eye Position(Event Player), Multiply(Facing Direction Of(Event Player), 15)), Null, Event Player, False), Up), Add(Ray Cast Hit Position(Eye Position(Event Player), Add(Eye Position(Event Player), Multiply(Facing Direction Of(Event Player), 15)), Null, Event Player, False), Multiply(Down, 100)), Null, Event Player, False)), 1);
Play Effect(Event Player, Buff Explosion Sound, Color(White), Event Player, 100);
"Create slingshot destination effect"
Create Effect(Event Player, Light Shaft, If-Then-Else((Event Player).SlingshotUsed, Color(Rose), Color(Yellow)), Update Every Frame(Ray Cast Hit Position(Add(Ray Cast Hit Position(Eye Position(Event Player), Add(Eye Position(Event Player), Multiply(Facing Direction Of(Event Player), 15)), Null, Event Player, False), Up), Add(Ray Cast Hit Position(Eye Position(Event Player), Add(Eye Position(Event Player), Multiply(Facing Direction Of(Event Player), 15)), Null, Event Player, False), Multiply(Down, 100)), Null, Event Player, False)), 0.1, Visible To Position Radius and Color);
Modify Player Variable(Event Player, Hud_Slingshot, Append To Array, Last Created Entity);
Create Effect(Event Player, Ring, If-Then-Else((Event Player).SlingshotUsed, Color(Rose), Color(Yellow)), Update Every Frame(Ray Cast Hit Position(Add(Ray Cast Hit Position(Eye Position(Event Player), Add(Eye Position(Event Player), Multiply(Facing Direction Of(Event Player), 15)), Null, Event Player, False), Up), Add(Ray Cast Hit Position(Eye Position(Event Player), Add(Eye Position(Event Player), Multiply(Facing Direction Of(Event Player), 15)), Null, Event Player, False), Multiply(Down, 100)), Null, Event Player, False)), 1, Visible To Position Radius and Color);
Modify Player Variable(Event Player, Hud_Slingshot, Append To Array, Last Created Entity);
Play Effect(Event Player, Good Explosion, If-Then-Else((Event Player).SlingshotUsed, Color(Rose), Color(Yellow)), Update Every Frame(Ray Cast Hit Position(Add(Ray Cast Hit Position(Eye Position(Event Player), Add(Eye Position(Event Player), Multiply(Facing Direction Of(Event Player), 15)), Null, Event Player, False), Up), Add(Ray Cast Hit Position(Eye Position(Event Player), Add(Eye Position(Event Player), Multiply(Facing Direction Of(Event Player), 15)), Null, Event Player, False), Multiply(Down, 100)), Null, Event Player, False)), 1);
Play Effect(Event Player, Buff Impact Sound, Color(White), Event Player, 100);
For Player Variable(Event Player, playerHudIndex, 0, Count Of((Event Player).Hud_Slingshot), 1);
Destroy Effect(Value In Array((Event Player).Hud_Slingshot, (Event Player).playerHudIndex));
End;
Set Player Variable(Event Player, Hud_Slingshot, Empty Array);
"Allow Primary Fire"
Allow Button(Event Player, Button(Primary Fire));
}
}
rule ("Confirm Slingshot") {
event {
Ongoing - Each Player;
All;
All;
}
conditions {
(Event Player).SlingshotEnabled == True;
Is Button Held(Event Player, Button(Primary Fire)) == True;
}
actions {
Abort If(Has Status(Event Player, Rooted));
If((Event Player).SlingshotUsed);
Small Message(Event Player, Value In Array(Array(Custom String("SLINGSHOT IS ON COOLDOWN", Null, Null, Null)), Max(False, Index Of Array Value(Global.practiceRangeTranslations, Custom String("{0}", Map(Practice Range), Null, Null)))));
Abort;
Else If(Is In Air(Event Player));
Small Message(Event Player, Value In Array(Array(Custom String("SLINGSHOT CANNOT BE USED WHILE IN THE AIR", Null, Null, Null)), Max(False, Index Of Array Value(Global.practiceRangeTranslations, Custom String("{0}", Map(Practice Range), Null, Null)))));
Abort;
End;
Play Effect(All Players(Opposite Team Of(Team Of(Event Player))), Buff Explosion Sound, Color(White), Event Player, 30);
Play Effect(Event Player, Buff Impact Sound, Color(White), Event Player, 100);
"Fling player toward point"
Set Player Variable(Event Player, SlingshotPosition, Update Every Frame(Ray Cast Hit Position(Add(Ray Cast Hit Position(Eye Position(Event Player), Add(Eye Position(Event Player), Multiply(Facing Direction Of(Event Player), 15)), Null, Event Player, False), Up), Add(Ray Cast Hit Position(Eye Position(Event Player), Add(Eye Position(Event Player), Multiply(Facing Direction Of(Event Player), 15)), Null, Event Player, False), Multiply(Down, 100)), Null, Event Player, False)));
Wait Until(Not(Is In Spawn Room(Event Player)), 9999);
Start Damage Modification(Event Player, All Players(All Teams), If-Then-Else(Compare(Global.CurrentGameState, ==, 2), 9999999999, 0), Receivers Damagers and Damage Percent);
Log To Inspector(Custom String("Hider Setup finished for {0}", Event Player, Null, Null));
}
}
rule ("Hiders Joined Late") {
event {
Ongoing - Each Player;
Team 1;
All;
}
conditions {
Global.CurrentGameState == 2;
Has Spawned(Event Player) == False;
}
actions {
Set Player Variable(Event Player, JoinedLate, True);
}
}
rule ("Kill Hiders Who Joined Late") {
event {
Ongoing - Each Player;
Team 1;
All;
}
conditions {
Global.CurrentGameState == 2;
(Event Player).JoinedLate == True;
Has Spawned(Event Player) == True;
}
actions {
Disable Hero HUD(Event Player);
"Create hud"
Create In-World Text(Event Player, Custom String("YOU JOINED LATE!", Null, Null, Null), Update Every Frame(Add(Eye Position(Event Player), Facing Direction Of(Event Player))), 5, Do Not Clip, Visible To and Position, Color(Rose), Visible Never);
Modify Player Variable(Event Player, Huds_JoinedLate, Append To Array, Last Text ID);
Create In-World Text(Event Player, Custom String("YOU WILL BE PUT INTO SPECTATOR", Null, Null, Null), Update Every Frame(Add(Add(Eye Position(Event Player), Evaluate Once(Vector(0, -0.1, 0))), Facing Direction Of(Event Player))), 2, Do Not Clip, Visible To and Position, Color(Turquoise), Visible Never);
Modify Player Variable(Event Player, Huds_JoinedLate, Append To Array, Last Text ID);
Create In-World Text(Event Player, Custom String("PLEASE WAIT FOR THE NEXT ROUND", Null, Null, Null), Update Every Frame(Add(Add(Eye Position(Event Player), Evaluate Once(Vector(0, -0.2, 0))), Facing Direction Of(Event Player))), 2, Do Not Clip, Visible To and Position, Color(Turquoise), Visible Never);
Modify Player Variable(Event Player, Huds_JoinedLate, Append To Array, Last Text ID);
Set Status(Event Player, Null, Rooted, 5);
Wait(5, Ignore Condition);
"Destroy all hud text"
For Player Variable(Event Player, playerHudIndex, 0, Count Of((Event Player).Huds_JoinedLate), 1);
Destroy In-World Text(Value In Array((Event Player).Huds_JoinedLate, (Event Player).playerHudIndex));
End;
Set Player Variable(Event Player, Huds_JoinedLate, Null);
"Set JoinedLate to false so the spawn room kill rule can run"
Set Player Variable(Event Player, JoinedLate, False);
Set Player Variable(Event Player, ResurrectBlocked, True);
Wait Until(Or(Not(Is True For Any(All Tank Heroes, Compare(Current Array Element, ==, Hero Of(Event Player)))), Is In Alternate Form(Event Player)), 9999);
Set Ability Charge(Event Player, Button(Secondary Fire), 3);
}
}
rule ("Show Warning to Hider While In Spawn Room") {
event {
Ongoing - Each Player;
Team 1;
All;
}
conditions {
Is In Spawn Room(Event Player) == True;
Global.CurrentGameState == 1;
}
actions {
Create HUD Text(Event Player, Null, Null, Value In Array(Array(Custom String("{0} YOU WILL BE KILLED IF YOU REMAIN IN SPAWN AFTER HIDING PHASE {0}", Icon String(Warning), Null, Null)), Max(False, Index Of Array Value(Global.practiceRangeTranslations, Custom String("{0}", Map(Practice Range), Null, Null)))), Top, 2, Null, Null, Color(Rose), Visible To Sort Order String and Color, Default Visibility);
Set Player Variable(Event Player, Hud_InSpawn, Last Text ID);
Wait Until(Or(Not(Is In Spawn Room(Event Player)), Not(Compare(Global.CurrentGameState, ==, 1))), 9999);
Destroy HUD Text((Event Player).Hud_InSpawn);
Set Player Variable(Event Player, Hud_InSpawn, Null);
}
}
rule ("Slow Hider") {
event {
Ongoing - Each Player;
Team 1;
All;
}
conditions {
Global.WS_SET_SLOWHIDER != False;
Global.CurrentGameState == 2;
Closest Player To(Event Player, Team 2) != Null;
Is True For Any(All Players(Team 2), Is In Line of Sight(Event Player, Current Array Element, Barriers Do Not Block LOS)) == True;
}
actions {
Log To Inspector(Custom String("{0} is in line of sight of {1}", Event Player, Closest Player To(Event Player, Team 2), Null));
"Slow hider when in LOS and show Hud indicator"
Set Move Speed(Event Player, Divide((Event Player).BaseMoveSpeed, (Event Player).HiderSlowFactor));
Set Jump Vertical Speed(Event Player, Divide((Event Player).BaseJumpHeight, (Event Player).HiderSlowFactor));
Set Ability 1 Enabled(Event Player, False);
Set Ability 2 Enabled(Event Player, False);
Set Player Variable(Event Player, SlingshotEnabled, False);
Set Secondary Fire Enabled(Event Player, If-Then-Else(Compare(Hero Of(Event Player), ==, Hero(Wrecking Ball)), True, False));
Play Effect(Event Player, Explosion Sound, Color(White), Event Player, 250);
"Destroy Sombra's Translocator"
If(And(Compare(Hero Of(Event Player), ==, Hero(Sombra)), Is Using Ability 2(Event Player)));
Press Button(Event Player, Button(Interact));
End;
"Knock Sombra out of stealth"
If(And(Compare(Hero Of(Event Player), ==, Hero(Sombra)), Is Using Ability 1(Event Player)));
Cancel Primary Action(Event Player);
End;
"Prevent Wrecking Ball from losing grapple"
If(And(Not(Compare(Hero Of(Event Player), ==, Hero(Wrecking Ball))), Is Moving(Event Player)));
Cancel Primary Action(Event Player);
End;
Create HUD Text(Event Player, Null, Null, Custom String("{0} YOU ARE WITHIN LINE OF SIGHT OF A SEEKER {0}", Icon String(Warning), Null, Null), Top, 2, Null, Null, Color(Rose), Visible To Sort Order String and Color, Default Visibility);
Set Player Variable(Event Player, Hud_Detection, Last Text ID);
"Wait for hider to be out of LOS"
Wait Until(Is True For All(All Players(Team 2), Not(Is In Line of Sight(Event Player, Current Array Element, Barriers Do Not Block LOS))), 9999);
"Return hider state to normal"
Set Move Speed(Event Player, (Event Player).BaseMoveSpeed);
Set Jump Vertical Speed(Event Player, (Event Player).BaseJumpHeight);
Set Ability 1 Enabled(Event Player, True);
Set Ability 2 Enabled(Event Player, True);
Call Subroutine(RestrictAbilities);
Destroy HUD Text((Event Player).Hud_Detection);
Set Player Variable(Event Player, Hud_Detection, Null);
Log To Inspector(Custom String("{0} is no longer in line of sight", Event Player, Null, Null));
}
}
rule ("Hiders Joined Late") {
event {
Ongoing - Each Player;
Team 1;
All;
}
conditions {
Global.CurrentGameState == 2;
Has Spawned(Event Player) == False;
}
actions {
Set Player Variable(Event Player, JoinedLate, True);
}
}
rule ("Kill Hiders Who Joined Late") {
event {
Ongoing - Each Player;
Team 1;
All;
}
conditions {
Global.CurrentGameState == 2;
(Event Player).JoinedLate == True;
Has Spawned(Event Player) == True;
}
actions {
Disable Hero HUD(Event Player);
"Create hud"
Create In-World Text(Event Player, Value In Array(Array(Custom String("YOU JOINED LATE!", Null, Null, Null)), Max(False, Index Of Array Value(Global.practiceRangeTranslations, Custom String("{0}", Map(Practice Range), Null, Null)))), Update Every Frame(Add(Eye Position(Event Player), Facing Direction Of(Event Player))), 5, Do Not Clip, Visible To and Position, Color(Rose), Visible Never);
Modify Player Variable(Event Player, Huds_JoinedLate, Append To Array, Last Text ID);
Create In-World Text(Event Player, Value In Array(Array(Custom String("YOU WILL BE PUT INTO SPECTATOR", Null, Null, Null)), Max(False, Index Of Array Value(Global.practiceRangeTranslations, Custom String("{0}", Map(Practice Range), Null, Null)))), Update Every Frame(Add(Add(Eye Position(Event Player), Evaluate Once(Vector(0, -0.1, 0))), Facing Direction Of(Event Player))), 2, Do Not Clip, Visible To and Position, Color(Turquoise), Visible Never);
Modify Player Variable(Event Player, Huds_JoinedLate, Append To Array, Last Text ID);
Create In-World Text(Event Player, Value In Array(Array(Custom String("PLEASE WAIT FOR THE NEXT ROUND", Null, Null, Null)), Max(False, Index Of Array Value(Global.practiceRangeTranslations, Custom String("{0}", Map(Practice Range), Null, Null)))), Update Every Frame(Add(Add(Eye Position(Event Player), Evaluate Once(Vector(0, -0.2, 0))), Facing Direction Of(Event Player))), 2, Do Not Clip, Visible To and Position, Color(Turquoise), Visible Never);
Modify Player Variable(Event Player, Huds_JoinedLate, Append To Array, Last Text ID);
Set Status(Event Player, Null, Rooted, 5);
Wait(5, Ignore Condition);
"Destroy all hud text"
For Player Variable(Event Player, playerHudIndex, 0, Count Of((Event Player).Huds_JoinedLate), 1);
Destroy In-World Text(Value In Array((Event Player).Huds_JoinedLate, (Event Player).playerHudIndex));
End;
Set Player Variable(Event Player, Huds_JoinedLate, Null);
"Set JoinedLate to false so the spawn room kill rule can run"
Set Player Variable(Event Player, JoinedLate, False);
Enable Hero HUD(Event Player);
}
}
rule ("Sombra Invisibility Tracker") {
event {
Ongoing - Each Player;
Team 1;
Sombra;
}
conditions {
Has Spawned(Event Player) == True;
Is Using Ability 1(Event Player) == True;
}
actions {
"Create effects and hud"
Create Effect(All Players(All Teams), Bad Aura, Color(Team 1), Update Every Frame(Add(Position Of(Event Player), Up)), 1, Visible To Position Radius and Color);
Modify Player Variable(Event Player, Effects_SombraInvis, Append To Array, Last Created Entity);
Create In-World Text(All Players(Team 2), Event Player, Event Player, 1, Clip Against Surfaces, Visible To Position and String, Color(Team 1), Default Visibility);
Modify Player Variable(Event Player, Effects_SombraInvis, Append To Array, Last Text ID);
Create HUD Text(Event Player, Null, Null, Value In Array(Array(Custom String("{0} YOU ARE VISIBLE TO SEEKERS {0}", Icon String(Warning), Null, Null)), Max(False, Index Of Array Value(Global.practiceRangeTranslations, Custom String("{0}", Map(Practice Range), Null, Null)))), Top, 2, Null, Null, Color(Rose), Visible To Sort Order String and Color, Default Visibility);
Modify Player Variable(Event Player, Effects_SombraInvis, Append To Array, Last Text ID);
Wait Until(Not(Is Using Ability 1(Event Player)), 9999);
"Destroy all hud text and effects"
For Player Variable(Event Player, playerHudIndex, 0, Count Of((Event Player).Effects_SombraInvis), 1);
Destroy In-World Text(Value In Array((Event Player).Effects_SombraInvis, (Event Player).playerHudIndex));
Destroy HUD Text(Value In Array((Event Player).Effects_SombraInvis, (Event Player).playerHudIndex));
Destroy Effect(Value In Array((Event Player).Effects_SombraInvis, (Event Player).playerHudIndex));
End;
Set Player Variable(Event Player, Effects_SombraInvis, Null);
}
}
rule ("Sombra: Destroy Translocator") {
event {
Ongoing - Each Player;
Team 1;
Sombra;
}
conditions {
Has Spawned(Event Player) == True;
Is Using Ability 2(Event Player) == True;
}
actions {
Create HUD Text(Event Player, Null, Null, Value In Array(Array(Custom String("{0} YOUR TRANSLOCATOR WILL BE DESTROYED IN {1} SECONDS OR WHEN IT IS OUT OF LOS {0}", Icon String(Warning), Ability Cooldown(Event Player, Button(Ability 2)), Null)), Max(False, Index Of Array Value(Global.practiceRangeTranslations, Custom String("{0}", Map(Practice Range), Null, Null)))), Top, 2, Null, Null, Color(Rose), Visible To Sort Order String and Color, Default Visibility);
Set Player Variable(Event Player, Hud_SombraTrans, Last Text ID);
Wait Until(Or(Or(Compare(Ability Cooldown(Event Player, Button(Ability 2)), ==, 0), Not(Is Using Ability 2(Event Player))), Not(Is In Line of Sight(Eye Position(Event Player), Evaluate Once(Ray Cast Hit Position(Eye Position(Event Player), Add(Eye Position(Event Player), Multiply(Facing Direction Of(Event Player), 25)), Null, Event Player, False)), Barriers Do Not Block LOS))), 6);
Press Button(Event Player, Button(Interact));
"Destroy all hud text and effects"
Destroy HUD Text((Event Player).Hud_SombraTrans);
Set Player Variable(Event Player, Hud_SombraTrans, Null);
}
}
rule ("Sombra: Clear Effects When Switching Heroes") {
event {
Ongoing - Each Player;
Team 1;
All;
}
conditions {
Hero Of(Event Player) != Hero(Sombra);
}
actions {
"Destroy all hud text and effects"
For Player Variable(Event Player, playerHudIndex, 0, Count Of((Event Player).Effects_SombraInvis), 1);
Destroy In-World Text(Value In Array((Event Player).Effects_SombraInvis, (Event Player).playerHudIndex));
Destroy HUD Text(Value In Array((Event Player).Effects_SombraInvis, (Event Player).playerHudIndex));
Destroy Effect(Value In Array((Event Player).Effects_SombraInvis, (Event Player).playerHudIndex));
End;
Set Player Variable(Event Player, Effects_SombraInvis, Null);
Set Player Variable(Event Player, CameraState, 2);
Call Subroutine(StartThirdPersonCamera);
Else;
Set Player Variable(Event Player, CameraState, 0);
}
}
rule ("Refresh Resurrect Cooldown") {
event {
Ongoing - Each Player;
Team 1;
Mercy;
}
conditions {
Global.WS_SET_MODE == 3;
Global.CurrentGameState == 2;
Is Using Ability 2(Event Player) == True;
}
actions {
Wait Until(Is Using Ability 2(Event Player), 9999);
Set Ability Cooldown(Event Player, Button(Ability 2), 0);
}
}
rule ("Seeker Setup") {
event {
Ongoing - Each Player;
Team 2;
All;
}
actions {
"Seeker Setup"
Set Player Allowed Heroes(Event Player, If-Then-Else(Global.WS_SET_ADV_SEEK_ALLOWH, All Heroes, Remove From Array(All Heroes, Array(Hero(Moira), Hero(Zenyatta), Hero(Sombra)))));
"Mercy V. Rein"
If(True);
Skip(Value In Array(Array(5, 0), Add(1, Index Of Array Value(Array(3), Global.WS_SET_MODE))));
//__label_switch_8_0__:
Set Player Allowed Heroes(Event Player, Hero(Reinhardt));
Set Move Speed(Event Player, Multiply((Event Player).BaseMoveSpeed, 2));
Set Jump Vertical Speed(Event Player, Multiply((Event Player).BaseJumpHeight, 1.75));
Set Secondary Fire Enabled(Event Player, False);
Else;
//__label_switch_8_default__:
Else;
End;
Wait Until(Has Spawned(Event Player), 9999);
"Create Seeker Name"
If(True);
Skip(Value In Array(Array(1, 0), Add(1, Index Of Array Value(Array(11), Global.WS_SET_SEEKER_OUTLINES))));
//__label_switch_9_0__:
Else;
//__label_switch_9_default__:
Create In-World Text(All Players(Team 1), Event Player, Event Player, 1, Clip Against Surfaces, Visible To Position and String, Color(Team 2), Default Visibility);
Count Of(Filtered Array(Players Within Radius(Event Player, 30, Team 1, Off), Is Alive(Current Array Element))) > 0;
}
actions {
"Create hud text"
Create HUD Text(Event Player, Null, Null, Value In Array(Array(Custom String("{0} THERE ARE HIDERS IN THIS AREA {0}", Icon String(Warning), Null, Null)), Max(False, Index Of Array Value(Global.practiceRangeTranslations, Custom String("{0}", Map(Practice Range), Null, Null)))), Top, 2, Null, Null, Color(Rose), Visible To Sort Order String and Color, Default Visibility);
Set Player Variable(Event Player, Hud_Seeker_Assistance, Last Text ID);
"Wait until there are no hiders in range"
Wait Until(Compare(Count Of(Filtered Array(Players Within Radius(Event Player, 30, Team 1, Off), Is Alive(Current Array Element))), ==, 0), 9999);
Set Player Variable(Event Player, Hud_Seeker_Assistance, Null);
}
}
rule ("____________Skirmish Rules") {
event {
Ongoing - Global;
}
}
rule ("Title Hud") {
event {
Ongoing - Global;
}
conditions {
Current Game Mode == Game Mode(Skirmish);
}
actions {
Create In-World Text(All Players(All Teams), Value In Array(Array(Custom String("Hide & Seek", Null, Null, Null)), Max(False, Index Of Array Value(Global.practiceRangeTranslations, Custom String("{0}", Map(Practice Range), Null, Null)))), Add(Objective Position(Objective Index), Vector(0, 4, 0)), 5, Do Not Clip, Visible To and Position, Color(Blue), Visible Never);
Modify Global Variable(Hud_GameTitle, Append To Array, Last Text ID);
Create In-World Text(All Players(All Teams), Value In Array(Array(Custom String("Ultimate", Null, Null, Null)), Max(False, Index Of Array Value(Global.practiceRangeTranslations, Custom String("{0}", Map(Practice Range), Null, Null)))), Add(Objective Position(Objective Index), Vector(0, 3.5, 0)), 2, Do Not Clip, Visible To and Position, Color(Sky Blue), Visible Never);
Modify Global Variable(Hud_GameTitle, Append To Array, Last Text ID);
Create In-World Text(All Players(All Teams), Custom String("{0}: {1}", Value In Array(Array(Custom String("Style", Null, Null, Null)), Max(False, Index Of Array Value(Global.practiceRangeTranslations, Custom String("{0}", Map(Practice Range), Null, Null)))), Value In Array(Array(Value In Array(Array(Custom String("DEFAULT", Null, Null, Null)), Max(False, Index Of Array Value(Global.practiceRangeTranslations, Custom String("{0}", Map(Practice Range), Null, Null)))), Value In Array(Array(Custom String("GLITCH", Null, Null, Null)), Max(False, Index Of Array Value(Global.practiceRangeTranslations, Custom String("{0}", Map(Practice Range), Null, Null)))), Value In Array(Array(Custom String("TINY", Null, Null, Null)), Max(False, Index Of Array Value(Global.practiceRangeTranslations, Custom String("{0}", Map(Practice Range), Null, Null)))), Value In Array(Array(Custom String("MERCY VS. REINHARDT", Null, Null, Null)), Max(False, Index Of Array Value(Global.practiceRangeTranslations, Custom String("{0}", Map(Practice Range), Null, Null))))), Global.WS_SET_MODE_RAW), Null), Add(Objective Position(Objective Index), Vector(0, 3, 0)), 1, Do Not Clip, Visible To Position and String, Color(Rose), Visible Never);
Modify Global Variable(Hud_GameTitle, Append To Array, Last Text ID);
Create In-World Text(All Players(All Teams), Value In Array(Array(Custom String("Waiting For Players", Null, Null, Null)), Max(False, Index Of Array Value(Global.practiceRangeTranslations, Custom String("{0}", Map(Practice Range), Null, Null)))), Add(Objective Position(Objective Index), Vector(0, 2.25, 0)), 1, Do Not Clip, Visible To and Position, Color(White), Visible Never);
Modify Global Variable(Hud_GameTitle, Append To Array, Last Text ID);
Create Effect(All Players(All Teams), Ring, Color(Turquoise), Objective Position(Objective Index), 10, Visible To Position and Radius);
Modify Global Variable(Hud_GameTitle, Append To Array, Last Created Entity);
Set Facing(Event Player, Add(Direction Towards(Eye Position(Event Player), Objective Position(Objective Index)), Vector(0, 0.5, 0)), To World);
}
}
rule ("Disable Abilities In Spawn") {
event {
Ongoing - Each Player;
All;
All;
}
conditions {
Or(Compare(Current Game Mode, ==, Game Mode(Skirmish)), Compare(Current Game Mode, ==, Game Mode(Capture The Flag))) == True;
Is In Spawn Room(Event Player) == True;
}
actions {
Set Ability 1 Enabled(Event Player, False);
Set Ability 2 Enabled(Event Player, False);
Set Secondary Fire Enabled(Event Player, False);
Cancel Primary Action(Event Player);
Wait Until(Not(Is In Spawn Room(Event Player)), 9999);
Call Subroutine(RestrictAbilities);
}
}
rule ("Prevent Flag Capture") {
event {
Ongoing - Each Player;
All;
All;
}
conditions {
Current Game Mode == Game Mode(Capture The Flag);
Distance Between(Position Of(Event Player), Value In Array(Array(Flag Position(Team 2), Flag Position(Team 1)), Index Of Array Value(Array(Team 1, Team 2), Team Of(Event Player)))) < 3;
}
actions {
Apply Impulse(Event Player, Direction Towards(Value In Array(Array(Flag Position(Team 2), Flag Position(Team 1)), Index Of Array Value(Array(Team 1, Team 2), Team Of(Event Player))), Position Of(Event Player)), 10, To World, Cancel Contrary Motion);
Wait(0.016, Ignore Condition);
Loop If Condition Is True;
}
}
rule ("D.va: TP to Mech Position (Hider)") {
event {
Ongoing - Each Player;
Team 1;
D.Va;
}
conditions {
Or(Compare(Current Game Mode, ==, Game Mode(Skirmish)), Compare(Current Game Mode, ==, Game Mode(Capture The Flag))) == True;
Global.CurrentGameState == 1;
(Event Player).DvaHasTeleported == False;
}
actions {
Set Player Variable(Event Player, DvaHasTeleported, True);
Small Message(Event Player, Value In Array(Array(Custom String("Wait until Seeking Phase to Leave", Null, Null, Null)), Max(False, Index Of Array Value(Global.practiceRangeTranslations, Custom String("{0}", Map(Practice Range), Null, Null)))));
Log To Inspector(Custom String("{0} left spawn room during hiding phase, respawning", Event Player, Null, Null));
}
}
rule ("Seeker Noclip Barrier") {
event {
Ongoing - Each Player;
Team 2;
All;
}
conditions {
Current Game Mode == Game Mode(Skirmish);
Global.WS_SET_MODE != 4;
Global.CurrentGameState == 2;
Is Moving(Event Player) == True;
Is On Ground(Event Player) == True;
Is In Line of Sight(Eye Position(Event Player), Add(World Vector Of(Throttle Of(Event Player), Event Player, Rotation And Translation), Vector(0, Evaluate Once(Divide(Distance Between(Eye Position(Event Player), Position Of(Event Player)), 2)), 0)), Barriers Do Not Block LOS) == True;
}
actions {
"Disable collision if the player is within line of sight of a point in the direction of throttle."
Disable Movement Collision With Environment(Event Player, False);
Wait(0.05, Ignore Condition);
Loop If Condition Is True;
Enable Movement Collision With Environment(Event Player);
Create HUD Text(All Players(Team 2), Null, Null, Value In Array(Array(Custom String("You are currently blind while the hiders hide!", Null, Null, Null)), Max(False, Index Of Array Value(Global.practiceRangeTranslations, Custom String("{0}", Map(Practice Range), Null, Null)))), Top, 2, Null, Null, Color(White), Visible To and String, Default Visibility);
Modify Global Variable(Hud_Seeker_Blindness, Append To Array, Last Text ID);
For Global Variable(globalHudIndex, 0, Count Of(Global.Hud_Seeker_Blindness), 1);
Destroy HUD Text(Value In Array(Global.Hud_Seeker_Blindness, Global.globalHudIndex));
End;
Set Global Variable(Hud_Seeker_Blindness, Null);
}
}
rule ("Lock Seeker in place until seeking phase") {
event {
Ongoing - Each Player;
Team 2;
All;
}
conditions {
Current Game Mode == Game Mode(Team Deathmatch);
Global.CurrentGameState == 1;
Has Spawned(Event Player) == True;
}
actions {
Log To Inspector(Custom String("Locking {0} in place", Event Player, Null, Null));
Set Status(Event Player, Null, Rooted, 9999);
"Create fog"
Create Effect(Event Player, Bad Aura, Color(Black), Update Every Frame(Add(Eye Position(Event Player), Multiply(Facing Direction Of(Event Player), 3))), 1000, Visible To Position and Radius);
Modify Player Variable(Event Player, Effect_Seeker_Blindness, Append To Array, Last Created Entity);
Create Effect(Event Player, Bad Aura, Color(Black), Update Every Frame(Add(Eye Position(Event Player), Multiply(Facing Direction Of(Event Player), 4))), 1000, Visible To Position and Radius);
Modify Player Variable(Event Player, Effect_Seeker_Blindness, Append To Array, Last Created Entity);
Create Effect(Event Player, Bad Aura, Color(Black), Update Every Frame(Add(Eye Position(Event Player), Multiply(Facing Direction Of(Event Player), -3))), 1000, Visible To Position and Radius);
Modify Player Variable(Event Player, Effect_Seeker_Blindness, Append To Array, Last Created Entity);