Skip to content

Instantly share code, notes, and snippets.

@nathan130200
Last active July 21, 2020 00:35
Show Gist options
  • Save nathan130200/8ab47e944f151042053283690d4e0eb3 to your computer and use it in GitHub Desktop.
Save nathan130200/8ab47e944f151042053283690d4e0eb3 to your computer and use it in GitHub Desktop.
Tiny overwatch - Workshop mode.
settings
{
lobby
{
Allow Players Who Are In Queue: Yes
Match Voice Chat: Enabled
}
modes
{
Skirmish
{
enabled maps
{
Rialto
}
}
General
{
Game Mode Start: Immediately
Hero Limit: Off
Respawn As Random Hero: On
Spawn Health Packs: Disabled
}
}
heroes
{
General
{
Ability Cooldown Time: 15%
Ammunition Clip Size Scalar: 300%
Health: 250%
Infinite Ultimate Duration: On
Movement Speed: 125%
Projectile Gravity: 25%
Ultimate Duration: 500%
Ultimate Generation: 500%
Ultimate Generation - Combat: 500%
Ultimate Generation - Passive: 500%
}
}
}
variables
{
global:
0: team_pos_array
player:
0: score_kills
1: score_deaths
2: score_text_ref
}
rule("Setup global")
{
event
{
Ongoing - Global;
}
actions
{
Set Match Time(3599);
Disable Built-In Game Mode Announcer;
Disable Built-In Game Mode Completion;
Disable Built-In Game Mode Music;
Create HUD Text(Filtered Array(All Players(All Teams), Round To Integer(Server Load Average, Up) >= 75), Null, Custom String(
"{0} {1}: {2}%", Icon String(Warning), String("Server Load"), Min(100, Server Load Average)), Null, Right, -1, White, Yellow,
White, Visible To and String, Visible Always);
Create HUD Text(All Players(All Teams), Null, Null, Custom String("Hold \"{0}\" to respawn if you cannot respawn.", Button(
Interact)), Top, -1, White, White, White, Visible To and String, Default Visibility);
}
}
rule("Baptiste fast projectile.")
{
event
{
Ongoing - Each Player;
All;
Baptiste;
}
conditions
{
Is Button Held(Event Player, Primary Fire) == True;
}
actions
{
Set Projectile Speed(Event Player, 250);
Wait(0.150, Ignore Condition);
Loop If Condition Is True;
}
}
rule("Respawn Team 1")
{
event
{
Ongoing - Each Player;
Team 1;
All;
}
conditions
{
Is In Spawn Room(Event Player) == True;
}
actions
{
Teleport(Event Player, Global.team_pos_array[0]);
Set Status(Event Player, Null, Invincible, 2);
}
}
rule("Respawn Team 2")
{
event
{
Ongoing - Each Player;
Team 2;
All;
}
conditions
{
Is In Spawn Room(Event Player) == True;
}
actions
{
Teleport(Event Player, Global.team_pos_array[1]);
Set Status(Event Player, Null, Invincible, 2);
}
}
disabled rule("====================================================== Misc ======================================================")
{
event
{
Ongoing - Global;
}
}
rule("Player respawn.")
{
event
{
Ongoing - Each Player;
All;
All;
}
conditions
{
Is In Spawn Room(Event Player) == True;
}
actions
{
Wait(0.250, Ignore Condition);
Start Forcing Player To Be Hero(Event Player, Random Value In Array(Randomized Array(All Heroes)));
}
}
rule("Player force respawn.")
{
event
{
Ongoing - Each Player;
All;
All;
}
conditions
{
Is Button Held(Event Player, Interact) == True;
Is Moving(Event Player) == False;
}
actions
{
Wait(1, Abort When False);
Small Message(Event Player, Custom String("Respawn in 3..."));
Wait(1, Abort When False);
Small Message(Event Player, Custom String("Respawn in 2..."));
Wait(1, Abort When False);
Small Message(Event Player, Custom String("Respawn in 1..."));
Wait(1, Abort When False);
Kill(Event Player, Event Player);
Disable Built-In Game Mode Respawning(Event Player);
Enable Death Spectate All Players(Event Player);
Enable Death Spectate Target HUD(Event Player);
Wait(5.500, Ignore Condition);
Respawn(Event Player);
}
}
rule("Create player score text.")
{
event
{
Player Joined Match;
All;
All;
}
conditions
{
Event Player.score_text_ref == Null;
}
actions
{
Create HUD Text(All Players(Team Of(Event Player)), Hero Icon String(Hero Of(Event Player)), Event Player, Custom String(
"{0} / {1}", Event Player.score_kills, Event Player.score_deaths), Left, Slot Of(Event Player) * -1, White, White, White,
Visible To Sort Order and String, Visible Always);
Event Player.score_text_ref = Last Text ID;
}
}
rule("Destroy player score text.")
{
event
{
Player Left Match;
All;
All;
}
actions
{
Destroy HUD Text(Event Player.score_text_ref);
}
}
rule("Player Score: Kills & Deaths")
{
event
{
Player Died;
All;
All;
}
conditions
{
Attacker != Victim;
Entity Exists(Attacker) == True;
}
actions
{
Attacker.score_kills += 1;
Victim.score_deaths += 1;
Wait(0.250, Ignore Condition);
Disable Built-In Game Mode Respawning(Victim);
Enable Death Spectate All Players(Victim);
Enable Death Spectate Target HUD(Victim);
Wait(5.500, Ignore Condition);
Respawn(Victim);
}
}
disabled rule("====================================================== Maps ======================================================")
{
event
{
Ongoing - Global;
}
}
rule("Map: Rialto")
{
event
{
Ongoing - Global;
}
conditions
{
Current Map == Map(Rialto);
}
actions
{
Global.team_pos_array = Array(Vector(72.225, 1.196, -56.961), Vector(58.797, 5.196, -85.784));
}
}
rule("Respawn self kill.")
{
event
{
Player Died;
All;
All;
}
conditions
{
(Attacker == Null || Attacker == Victim) == True;
}
actions
{
Victim.score_deaths += 1;
Wait(1, Ignore Condition);
Disable Built-In Game Mode Respawning(Victim);
Enable Death Spectate All Players(Victim);
Enable Death Spectate Target HUD(Victim);
Wait(5.500, Ignore Condition);
Respawn(Victim);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment