Skip to content

Instantly share code, notes, and snippets.

@nathan130200
Created December 16, 2020 21:34
Show Gist options
  • Save nathan130200/9c8c307b063985ad48c37a173ece7598 to your computer and use it in GitHub Desktop.
Save nathan130200/9c8c307b063985ad48c37a173ece7598 to your computer and use it in GitHub Desktop.
Overwatch Workshop - Avoid Cars (New Map: Kanezaka)
settings
{
lobby
{
Map Rotation: Paused
Return To Lobby: Never
}
modes
{
Deathmatch
{
enabled maps
{
Kanezaka
}
}
General
{
Enemy Health Bars: Off
Game Length In Minutes: 15
Game Mode Start: Immediately
Hero Limit: Off
Respawn As Random Hero: On
Respawn Time Scalar: 0%
Score To Win: 1
Spawn Health Packs: Disabled
}
}
heroes
{
General
{
Ability Cooldown Time: 35%
Damage Dealt: 10%
Health: 25%
Jump Vertical Speed: 150%
Movement Gravity: 75%
No Ammunition Requirement: On
enabled heroes
{
Reaper
}
}
}
}
variables
{
global:
0: DisableCollisionLocations
player:
0: HeroIndex
1: CurrentCollisionLocation
}
subroutines
{
0: AdvanceNextHero
1: RestoreCurrentHero
2: FindCollisionLocation
3: RespawnPlayer
}
rule("Setup global")
{
event
{
Ongoing - Global;
}
actions
{
Disable Built-In Game Mode Announcer;
Disable Built-In Game Mode Completion;
Disable Built-In Game Mode Music;
Disable Built-In Game Mode Scoring;
Global.DisableCollisionLocations = Array(Vector(-59.561, 17.639, 28.096), Vector(-18.161, 15.973, 56.760));
}
}
rule("Setup player")
{
event
{
Player Joined Match;
All;
All;
}
actions
{
Event Player.HeroIndex = 0;
Create HUD Text(Filtered Array(Append To Array(Empty Array, Event Player), Event Player.HeroIndex < Count Of(All Heroes) - 1),
Hero Icon String(All Heroes[Event Player.HeroIndex + 1]), String("Next Hero"), All Heroes[Event Player.HeroIndex + 1], Right,
-1, Color(Purple), Color(White), Color(Yellow), Visible To Sort Order String and Color, Default Visibility);
}
}
rule("Respawn detector.")
{
event
{
Ongoing - Each Player;
All;
All;
}
conditions
{
Is Alive(Event Player) == True;
}
actions
{
Wait(0.500, Ignore Condition);
Call Subroutine(RestoreCurrentHero);
Call Subroutine(RespawnPlayer);
}
}
rule("Advance next hero")
{
event
{
Subroutine;
AdvanceNextHero;
}
actions
{
Event Player.HeroIndex += 1;
Modify Player Score(Event Player, 1);
Start Forcing Player To Be Hero(Event Player, All Heroes[Event Player.HeroIndex]);
If(Event Player.HeroIndex >= Count Of(All Heroes));
Declare Player Victory(Event Player);
}
}
rule("Apply current hero")
{
event
{
Subroutine;
RestoreCurrentHero;
}
actions
{
If(Hero Of(Event Player) != All Heroes[Event Player.HeroIndex]);
Start Forcing Player To Be Hero(Event Player, All Heroes[Event Player.HeroIndex]);
End;
}
}
rule("Find near collision location")
{
event
{
Subroutine;
FindCollisionLocation;
}
actions
{
Event Player.CurrentCollisionLocation = First Of(Sorted Array(Global.DisableCollisionLocations, Distance Between(Event Player,
Current Array Element)));
}
}
rule("Update collision (loop).")
{
event
{
Ongoing - Each Player;
All;
All;
}
conditions
{
Is Alive(Event Player) == True;
}
actions
{
Call Subroutine(FindCollisionLocation);
If(Distance Between(Event Player, Event Player.CurrentCollisionLocation) <= 10);
Disable Movement Collision With Environment(Event Player, False);
Else;
Enable Movement Collision With Environment(Event Player);
End;
Wait(0.160, Ignore Condition);
Loop If Condition Is True;
}
}
rule("Add collision point")
{
event
{
Ongoing - Global;
}
conditions
{
Is Button Held(Host Player, Button(Interact)) == True;
}
actions
{
Modify Global Variable(DisableCollisionLocations, Append To Array, Position Of(Host Player));
}
}
rule("Checkpoint")
{
event
{
Ongoing - Global;
}
actions
{
Create Effect(All Players(All Teams), Light Shaft, Color(Orange), Vector(-1.201, 12.629, 83.038), 10,
Visible To Position and Radius);
Create Icon(All Players(All Teams), Vector(-1.201, 14, 83.038), Flag, Visible To and Position, Color(Green), True);
}
}
rule("Checkpoint validation")
{
event
{
Ongoing - Each Player;
All;
All;
}
conditions
{
Distance Between(Event Player, Vector(-1.201, 12.629, 83.038)) <= 12;
}
actions
{
Call Subroutine(AdvanceNextHero);
Respawn(Event Player);
Call Subroutine(RespawnPlayer);
}
}
rule("Respawn player")
{
event
{
Subroutine;
RespawnPlayer;
}
actions
{
Wait(0.250, Ignore Condition);
Enable Movement Collision With Environment(Event Player);
Teleport(Event Player, Vector(-50, 17.472, 28.806));
Set Status(Event Player, Host Player, Invincible, 3);
Set Move Speed(Event Player, 125);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment