Return to post
settings
{
main
{
Description: "You have 10 seconds to live, but punching others extends your life. Use recall to heal. Do not die or let the timer run out.\r\n\r\nMore workshops: workshop.codes/users/DragonEngineer\r\nDragonEngineer's Workshop Discord: discord.gg/9su249k"
Mode Name: "Short Lived"
}
lobby
{
Allow Players Who Are In Queue: Yes
Map Rotation: After A Game
Max Spectators: 6
Return To Lobby: Never
}
modes
{
Deathmatch
{
enabled maps
{
Castillo
Ecopoint: Antarctica
Ecopoint: Antarctica Winter
Hanamura
Hanamura Winter
Kanezaka
Necropolis
Oasis City Center
Oasis Gardens
Paris
}
}
General
{
Hero Limit: Off
Kill Cam: Off
Kill Feed: Off
Respawn As Random Hero: On
Respawn Time Scalar: 30%
Spawn Health Packs: Disabled
}
}
heroes
{
General
{
Tracer
{
Blink Cooldown Time: 33%
Primary Fire: Off
Ultimate Ability Pulse Bomb: Off
}
enabled heroes
{
Tracer
}
}
}
}
variables
{
global:
0: gameIsRunning
1: arenaCenter
2: arenaRadius
3: winner
5: startingTime
6: maxTime
7: scoreToWin
8: infiniteMode
10: deathMessages
player:
0: timeLeft
1: isInPlay
2: isOpeningRules
}
rule("[Init] Global var and disable stuff")
{
event
{
Ongoing - Global;
}
actions
{
Disable Inspector Recording;
Disable Built-In Game Mode Scoring;
Disable Built-In Game Mode Announcer;
Disable Built-In Game Mode Completion;
Global.gameIsRunning = False;
"Custom settings"
Global.scoreToWin = Workshop Setting Integer(Custom String("Victory condition"), Custom String("Score to win"), 5, 5, 15, 0);
Global.infiniteMode = Workshop Setting Toggle(Custom String("Victory condition"), Custom String("Infinite mode"), False, 0);
Global.startingTime = Workshop Setting Integer(Custom String("Time to live"), Custom String("Starting Time"), 10, 5, 15, 0);
Global.maxTime = Workshop Setting Integer(Custom String("Time to live"), Custom String("Maximum Time"), 15, 15, 30, 0);
"Random death messages"
Global.deathMessages = Array(Custom String("Your free trial of life has expired"), Custom String("Not enough time"), Custom String(
"You ran out of time"), String("Oops"), String("Oof"), Custom String("Don't procrastinate"), Custom String("Time's up"),
Custom String("Time waits for no one"), Custom String("Try again"), Custom String("Better luck next time"), Custom String(
"Lost time can never be found again"));
}
}
rule("[Init] Player var and disable stuff for each player")
{
event
{
Player Joined Match;
All;
All;
}
actions
{
Disable Game Mode HUD(Event Player);
Enable Death Spectate All Players(Event Player);
Disable Movement Collision With Players(Event Player);
Event Player.isInPlay = False;
Event Player.timeLeft = Global.startingTime;
Event Player.isOpeningRules = True;
"Make total HP be 200"
Add Health Pool To Player(Event Player, Health, 50, True, False);
"Time left"
Create HUD Text(Event Player, Custom String(" {0} {1}: {2} ", Ability Icon String(Hero(Lúcio), Button(Ability 2)), String("Time"),
String("{0} sec", Event Player.timeLeft)), Custom String(" "), Custom String(" "), Top, 1, Color(Orange), Color(White), Color(
White), Visible To and String, Default Visibility);
"Show current time and HP to spectator"
Create In-World Text(Is Alive(Event Player) ? All Dead Players(All Teams) : Null, Custom String("{0} | {1}", Custom String(
"{0} {1}", Ability Icon String(Hero(Lúcio), Button(Ability 2)), Event Player.timeLeft), Custom String("{0} {1}", Icon String(
Plus), Health(Event Player))), Event Player, 1.500, Do Not Clip, Visible To Position and String, Color(Aqua),
Default Visibility);
}
}
rule("[Init] Disable respawn when game started")
{
event
{
Ongoing - Each Player;
All;
All;
}
conditions
{
Is Waiting For Players == False;
}
actions
{
Disable Built-In Game Mode Respawning(Event Player);
}
}
rule("[Player] Press interact to toggle open and close instructions")
{
event
{
Ongoing - Each Player;
All;
All;
}
conditions
{
Is Button Held(Event Player, Button(Interact)) == True;
}
actions
{
If(Event Player.isOpeningRules);
Event Player.isOpeningRules = False;
Else;
Event Player.isOpeningRules = True;
End;
}
}
rule("[HUD and effects] Create HUD and effects")
{
event
{
Ongoing - Global;
}
actions
{
Create Effect(All Players(All Teams), Light Shaft, Color(Sky Blue), Global.arenaCenter + Vector(0, -5, 0), Global.arenaRadius,
Visible To Position and Radius);
Create Effect(All Players(All Teams), Ring, Color(Sky Blue), Global.arenaCenter, Global.arenaRadius,
Visible To Position and Radius);
"Creator info"
Create HUD Text(All Players(All Teams), Custom String(" YCV8P "), Custom String("{0} Short Lived by DragonEngineer",
Ability Icon String(Hero(Lúcio), Button(Ability 2))), Custom String("discord.gg/9su249k [All lowercase]"), Right, 0, Color(
Sky Blue), Color(Green), Color(Yellow), Visible To and String, Default Visibility);
"Create score to win HUD"
If(Global.infiniteMode);
"Infinite mode"
Create HUD Text(All Players(All Teams), Custom String(" {0} Infinite Mode {0} ", Icon String(Spiral)), Custom String(" "),
Custom String(" "), Top, 0, Color(Green), Color(White), Color(White), Visible To and String, Default Visibility);
Else;
"Score to win"
Create HUD Text(All Players(All Teams), Custom String(" {0} Score to win: {1} {0} ", Icon String(Skull), Global.scoreToWin),
Custom String(" "), Custom String(" "), Top, 0, Color(Yellow), Color(White), Color(White), Visible To and String,
Default Visibility);
End;
"Starting next round"
Create HUD Text(Is Dead(Local Player) && !Local Player.isInPlay && Is Game In Progress ? Local Player : Null, Custom String(
" Starting next round... ", Icon String(Spiral)), Custom String(" "), Custom String(" "), Top, -1, Color(Blue), Color(White),
Color(White), Visible To and String, Default Visibility);
}
}
rule("[HUD] Shows game rules")
{
event
{
Ongoing - Global;
}
actions
{
"For matchmaker thing"
Create HUD Text(All Players(All Teams), Null, Null, Custom String(" \r\n \r\n \r\n "), Left, 0, Color(White), Color(White), Color(
White), Visible To, Default Visibility);
"Welcome to Short Lived"
Create HUD Text(Local Player.isOpeningRules ? Local Player : Null, Null, Custom String(" "), Custom String(
"Welcome to {0} Short Lived!", Ability Icon String(Hero(Lúcio), Button(Ability 2))), Left, 1, Color(White), Color(White),
Color(Sky Blue), Visible To, Default Visibility);
"10 seconds to live, Punch others to extend life"
Create HUD Text(Local Player.isOpeningRules ? Local Player : Null, Null, Custom String(" "), Custom String(
"You only have {0} seconds to live!", Global.startingTime), Left, 2, Color(White), Color(White), Color(Aqua), Visible To,
Default Visibility);
Create HUD Text(Local Player.isOpeningRules ? Local Player : Null, Null, Null, Custom String(
"But punching {0} others extends your life.", Ability Icon String(Hero(Ana), Button(Melee))), Left, 3, Color(White), Color(
White), Color(Aqua), Visible To, Default Visibility);
"Use recall to heal, do not die"
Create HUD Text(Local Player.isOpeningRules ? Local Player : Null, Null, Custom String(" "), Custom String(
"Use {0} Recall to heal you back up!", Ability Icon String(Hero(Tracer), Button(Ability 2))), Left, 4, Color(White), Color(
White), Color(Aqua), Visible To, Default Visibility);
Create HUD Text(Local Player.isOpeningRules ? Local Player : Null, Null, Null, Custom String(
"Do not die or let the timer {0} run out.", Ability Icon String(Hero(Lúcio), Button(Ability 2))), Left, 5, Color(White), Color(
White), Color(Aqua), Visible To, Default Visibility);
"Close gamerule"
Create HUD Text(Local Player, Null, Custom String(" "), Custom String("> Press [{0}] to {1} the game rules.", Input Binding String(
Button(Interact)), Local Player.isOpeningRules ? Custom String("close") : Custom String("see")), Left, 6, Color(White), Color(
White), Local Player.isOpeningRules ? Color(Lime Green) : Color(Orange), Visible To String and Color, Default Visibility);
}
}
rule("[Game] Teleport player to position")
{
event
{
Ongoing - Each Player;
All;
All;
}
conditions
{
Is Waiting For Players == False;
Has Spawned(Event Player) == True;
}
actions
{
Wait(0.250, Ignore Condition);
Teleport(Event Player, Global.arenaCenter);
}
}
rule("[Game] Starting a round")
{
event
{
Ongoing - Global;
}
conditions
{
Is Game In Progress == True;
Global.gameIsRunning == False;
}
actions
{
"Set up"
All Players(All Teams).timeLeft = Global.startingTime;
All Players(All Teams).isInPlay = False;
Set Melee Enabled(All Players(All Teams), False);
Set Status(All Players(All Teams), Null, Invincible, 6);
"Starting..."
Big Message(All Players(All Teams), Custom String("Get ready!"));
Wait(3, Ignore Condition);
Play Effect(All Players(All Teams), Buff Explosion Sound, Color(White), Global.arenaCenter, 100);
Small Message(All Players(All Teams), Custom String("3..."));
Wait(1, Ignore Condition);
Play Effect(All Players(All Teams), Buff Explosion Sound, Color(White), Global.arenaCenter, 100);
Small Message(All Players(All Teams), Custom String("2..."));
Wait(1, Ignore Condition);
Play Effect(All Players(All Teams), Buff Explosion Sound, Color(White), Global.arenaCenter, 100);
Small Message(All Players(All Teams), Custom String("1..."));
Wait(1, Ignore Condition);
Play Effect(All Players(All Teams), Ring Explosion Sound, Color(White), Global.arenaCenter, 100);
Small Message(All Players(All Teams), Custom String("Go!!!"));
Set Player Health(All Players(All Teams), 200);
"Set players to be in play"
Filtered Array(All Players(All Teams), Has Spawned(Current Array Element)).isInPlay = True;
Set Melee Enabled(All Players(All Teams), True);
"Start the game"
Global.gameIsRunning = True;
Chase Player Variable At Rate(All Players(All Teams), timeLeft, 0, 1, Destination and Rate);
}
}
rule("[Game] If meleed a player, add 2s, capped at maxTime")
{
event
{
Player Dealt Damage;
All;
All;
}
conditions
{
Global.gameIsRunning == True;
Event Ability == Button(Melee);
}
actions
{
Event Player.timeLeft += 2;
If(Event Player.timeLeft > Global.maxTime);
Event Player.timeLeft = Global.maxTime;
End;
}
}
rule("[Game] If killed a player, add 5s, capped at maxTime")
{
event
{
Player Dealt Final Blow;
All;
All;
}
conditions
{
Global.gameIsRunning == True;
Event Ability == Button(Melee);
}
actions
{
Event Player.timeLeft += 5;
If(Event Player.timeLeft > Global.maxTime);
Event Player.timeLeft = Global.maxTime;
End;
}
}
rule("[Game] Using recall to heal you back")
{
event
{
Ongoing - Each Player;
All;
All;
}
conditions
{
Is Using Ability 2(Event Player) == True;
Global.gameIsRunning == True;
}
actions
{
Wait(0.500, Ignore Condition);
Heal(Event Player, Null, Max Health(Event Player));
}
}
rule("[Out of bound] If out of bound, apply impulse")
{
event
{
Ongoing - Each Player;
All;
All;
}
conditions
{
Is Game In Progress == True;
Has Spawned(Event Player) == True;
Distance Between(Position Of(Event Player), Vector(X Component Of(Global.arenaCenter), Y Component Of(Position Of(Event Player)),
Z Component Of(Global.arenaCenter))) > Global.arenaRadius - 1;
}
actions
{
Apply Impulse(Event Player, Direction Towards(Position Of(Event Player), Global.arenaCenter + Vector(0, 3, 0)), 30, To World,
Cancel Contrary Motion);
Wait(0.500, Abort When False);
Loop If Condition Is True;
}
}
rule("[Out of bound] If out of bound for too long, teleport instead. Also disable Blink while outside")
{
event
{
Ongoing - Each Player;
All;
All;
}
conditions
{
Is Game In Progress == True;
Has Spawned(Event Player) == True;
Distance Between(Position Of(Event Player), Vector(X Component Of(Global.arenaCenter), Y Component Of(Position Of(Event Player)),
Z Component Of(Global.arenaCenter))) > Global.arenaRadius - 1;
}
actions
{
Set Ability 1 Enabled(Event Player, False);
Wait(3, Abort When False);
Teleport(Event Player, Global.arenaCenter);
}
}
rule("[Out of bound] Re-enable blink after returning back in")
{
event
{
Ongoing - Each Player;
All;
All;
}
conditions
{
Is Game In Progress == True;
Has Spawned(Event Player) == True;
Distance Between(Position Of(Event Player), Vector(X Component Of(Global.arenaCenter), Y Component Of(Position Of(Event Player)),
Z Component Of(Global.arenaCenter))) <= Global.arenaRadius - 1.500;
}
actions
{
Set Ability 1 Enabled(Event Player, True);
}
}
rule("[Death] Player died, stop chasing variable")
{
event
{
Player Died;
All;
All;
}
actions
{
Event Player.timeLeft = 0;
}
}
rule("[Death] If time is up, kill player and remove from play")
{
event
{
Ongoing - Each Player;
All;
All;
}
conditions
{
Global.gameIsRunning == True;
Event Player.timeLeft == 0;
Event Player.isInPlay == True;
Is Alive(Event Player) == True;
}
actions
{
Small Message(Event Player, Random Value In Array(Global.deathMessages));
"Explosive effect"
Play Effect(All Players(All Teams), Bad Explosion, Color(Red), Position Of(Event Player), 8);
Play Effect(Event Player, Explosion Sound, Color(White), Event Player, 75);
"Apply impulse and kill player"
Apply Impulse(Event Player, Vector(Random Real(-1, 1), 1, Random Real(-1, 1)), 100, To World, Cancel Contrary Motion);
Wait(0.100, Ignore Condition);
Kill(Event Player, Null);
}
}
rule("[Death] If player joined midgame, kill player")
{
event
{
Ongoing - Each Player;
All;
All;
}
conditions
{
Global.gameIsRunning == True;
Event Player.isInPlay == False;
Has Spawned(Event Player) == True;
}
actions
{
Kill(Event Player, Null);
}
}
rule("[Ending] Last person standing wins, reset current round and then start a new round")
{
event
{
Ongoing - Global;
}
conditions
{
Count Of(Filtered Array(All Living Players(All Teams), Has Spawned(Current Array Element))) <= 1;
Global.gameIsRunning == True;
}
actions
{
Stop Chasing Player Variable(All Players(All Teams), timeLeft);
Wait(0.100, Ignore Condition);
"If 1 player left, then that's the winner"
If(Count Of(Filtered Array(All Living Players(All Teams), Has Spawned(Current Array Element))) == 1);
Global.winner = First Of(Filtered Array(All Living Players(All Teams), Has Spawned(Current Array Element)));
Modify Player Score(Global.winner, 1);
Big Message(All Players(All Teams), Custom String("{0} {1}!", Global.winner, String("Wins")));
Wait(3, Ignore Condition);
"Declare winner"
If(Score Of(Global.winner) == Global.scoreToWin && !Global.infiniteMode);
Declare Player Victory(Global.winner);
Abort;
End;
Else;
Big Message(All Players(All Teams), Custom String("{0}!", String("Draw")));
Wait(3, Ignore Condition);
End;
"Respawn all players"
Resurrect(All Players(All Teams));
"Restart a new round"
Global.gameIsRunning = False;
}
}
disabled rule("----- Map data -----")
{
event
{
Ongoing - Global;
}
}
rule("Set the map center for Castillo")
{
event
{
Ongoing - Global;
}
conditions
{
Current Map == Map(Castillo);
}
actions
{
Global.arenaRadius = 14;
Global.arenaCenter = Vector(-98.900, 33.300, 57.500);
}
}
rule("Set the map center for Ecopoint Antarctica")
{
event
{
Ongoing - Global;
}
conditions
{
(Current Map == Map(Ecopoint: Antarctica)) != (Current Map == Map(Ecopoint: Antarctica Winter));
}
actions
{
Global.arenaRadius = 14;
Global.arenaCenter = Vector(-3.300, 5.800, 0);
}
}
rule("Set the map center for Hanamura")
{
event
{
Ongoing - Global;
}
conditions
{
(Current Map == Map(Hanamura)) != (Current Map == Map(Hanamura Winter));
}
actions
{
Global.arenaRadius = 16;
Global.arenaCenter = Vector(12.900, -1.200, -49);
}
}
rule("Set the map center for Kanezaka")
{
event
{
Ongoing - Global;
}
conditions
{
Current Map == Map(Kanezaka);
}
actions
{
Global.arenaRadius = 15;
Global.arenaCenter = Vector(-24, 5.900, 30.200);
}
}
rule("Set the map center for Oasis City Center")
{
event
{
Ongoing - Global;
}
conditions
{
Current Map == Map(Oasis City Center);
}
actions
{
Global.arenaRadius = 17;
Global.arenaCenter = Vector(143.500, 2.100, 247.600);
}
}
rule("Set the map center for Oasis Gardens")
{
event
{
Ongoing - Global;
}
conditions
{
Current Map == Map(Oasis Gardens);
}
actions
{
Global.arenaRadius = 18;
Global.arenaCenter = Vector(141.300, 7.400, -247.600);
}
}
rule("Set the map center for Necropolis")
{
event
{
Ongoing - Global;
}
conditions
{
Current Map == Map(Necropolis);
}
actions
{
Global.arenaRadius = 12;
Global.arenaCenter = Vector(-30.100, 2, 0);
}
}
rule("Set the map center for Paris")
{
event
{
Ongoing - Global;
}
conditions
{
Current Map == Map(Paris);
}
actions
{
Global.arenaRadius = 16;
Global.arenaCenter = Vector(-96.400, 12.100, -85);
}
}
rule("Warning to say map is not supported")
{
event
{
Ongoing - Global;
}
conditions
{
Global.arenaCenter == 0;
}
actions
{
Create HUD Text(All Players(All Teams), Custom String("{0} {1}: {2}", Icon String(Warning), String("Warning"), String("{0} {1}",
String("Unsafe"), String("Level"))), Null, Null, Left, 0, Color(Red), Color(White), Color(White), Visible To and String,
Default Visibility);
}
}