Return to post
settings
{
main
{
Description: "[v3.0] 1vs1 One Hero - by Marc304 --- Supported Maps: Castillo, Necropolis Ecopoint (+Winter), Black Forest (+Winter), Workshop Island (+Night), Chamber, Expanse(+Night)"
Description: "[v3.1] 1vs1 One Hero - by Marc304 --- Supported Maps: Castillo, Necropolis Ecopoint (+Winter), Black Forest (+Winter), Workshop Island (+Night), Chamber, Expanse(+Night)"
}
lobby
{
Max Spectators: 6
Max Team 1 Players: 1
Max Team 2 Players: 1
}
modes
{
disabled Deathmatch
{
Score To Win: 50
}
Team Deathmatch
{
Score To Win: 15
Score To Win: 5
enabled maps
{
Castillo
}
}
General
{
Allow Hero Switching: Off
Limit Roles: 2 Of Each Role Per Team
Respawn As Random Hero: On
Spawn Health Packs: Disabled
}
}
heroes
{
General
{
Lúcio
{
Crossfade: Off
}
Mercy
{
Regeneration: Off
Weapons Enabled: Caduceus Blaster Only
}
Sombra
{
Stealth: Off
}
}
}
}
variables
{
global:
1: goalScore
2: rounds
3: showHUD
6: playerFacing
11: heroplayed
13: hero2nd
17: heroListPos
24: tp1
25: tp2
player:
3: damage
}
subroutines
{
0: SwitchHero
1: Teleport
2: SetFacing
3: Slowmo
}
rule("Credits - By Marc304")
{
event
{
Ongoing - Global;
}
conditions
{
Is Game In Progress != True;
}
actions
{
Create HUD Text(All Players(All Teams), Null, Null, Custom String("By Marc304"), Right, 0, White, White, White,
Visible To and String, Default Visibility);
"Map Support"
Global.T = Last Text ID;
Create HUD Text(All Players(All Teams), Custom String("", Global.M), Null, Custom String("Supported Map: {0}", Global.M), Left, 0,
Yellow, White, Yellow, Visible To and String, Default Visibility);
Global.S = Last Text ID;
}
}
rule("Map TPs")
{
event
{
Player Joined Match;
All;
All;
}
actions
{
If(Current Map == Map(Castillo));
Global.tp1 = Vector(-100.298, 45.255, 74.219);
Global.tp2 = Vector(-106.032, 45.255, 42.884);
Global.M = True;
Else If(Current Map == Map(Ecopoint: Antarctica) || Current Map == Map(Ecopoint: Antarctica Winter));
Global.tp1 = Vector(1.156, 18.499, -12.031);
Global.tp2 = Vector(1.063, 18.499, 11.875);
Global.M = True;
Else If(Current Map == Map(Workshop Island) || Current Map == Map(Workshop Island Night));
Global.tp1 = Vector(0, 5.349, -10);
Global.tp2 = Vector(0, 5.349, 10);
Global.M = True;
Else If(Current Map == Map(Workshop Chamber) || Current Map == Map(Workshop Expanse) || Current Map == Map(
Workshop Expanse Night));
Global.tp1 = Vector(0, 5.349, -10);
Global.tp2 = Vector(0, 5.349, 10);
Global.M = True;
Else If(Current Map == Map(Black Forest) || Current Map == Map(Black Forest Winter));
Global.tp1 = Vector(-13.098, 19.712, 14.660);
Global.tp2 = Vector(-13.190, 19.712, -4.057);
Global.M = True;
Else If(Current Map == Map(Necropolis));
Global.tp1 = Vector(3.267, 18.058, 16.932);
Global.tp2 = Vector(3.267, 18.058, -16.932);
Global.M = True;
Else;
Big Message(All Players(All Teams), Custom String("This map is not supported!"));
Global.M = False;
End;
}
}
rule("[Config] Create Hero List")
{
event
{
Ongoing - Global;
}
actions
{
"Played Hero - Don't deactivate the first rule! (but you can change the Hero)"
Global.heroplayed = Hero(McCree);
"Activate/Deactivate the damage stats HUD"
Global.showHUD = Workshop Setting Toggle(Custom String("HUD"), Custom String("Show Damage HUD"), True);
"Reset player facing"
Global.playerFacing = Workshop Setting Toggle(Custom String("Player facing reset"), Custom String(
"Reset player facing each round"), True);
"Goal Score"
Global.goalScore = Workshop Setting Integer(Custom String(
"Score to Win - You need to change this also in the Team-Deathmatch Settings!"), Custom String("Score to Win"), 5, 1, 100);
}
}
rule("Switch Hero")
{
event
{
Subroutine;
SwitchHero;
}
actions
{
"A second Hero is needed to reset the Heroes after one round"
Start Forcing Player To Be Hero(All Players(All Teams), Global.hero2nd);
Wait(0.016, Ignore Condition);
Start Forcing Player To Be Hero(All Players(All Teams), Global.heroplayed);
disabled Preload Hero(All Players(All Teams), Global.heroplayed[Global.heroListPos + 1]);
Preload Hero(All Players(All Teams), Global.hero2nd);
}
}
rule("Start")
{
event
{
Ongoing - Global;
}
conditions
{
Is Game In Progress == True;
}
actions
{
Set Objective Description(All Players(All Teams), Custom String("First to {1} Kills - Round: {0}", Global.rounds + 1,
Global.goalScore), Visible To and String);
Call Subroutine(SwitchHero);
Call Subroutine(Teleport);
Call Subroutine(SetFacing);
Call Subroutine(Slowmo);
Wait(0.200, Ignore Condition);
Destroy HUD Text(Global.F);
Destroy HUD Text(Global.P);
disabled Global.hero2nd = Hero(Winston);
}
}
rule("Teleport")
{
event
{
Subroutine;
Teleport;
}
actions
{
Teleport(Players In Slot(0, Team 1), Global.tp1);
Teleport(Players In Slot(0, Team 2), Global.tp2);
}
}
rule("Slowmo")
{
event
{
Subroutine;
Slowmo;
}
actions
{
Set Slow Motion(20);
Wait(0.500, Ignore Condition);
Set Slow Motion(100);
}
}
rule("Set Facing")
{
event
{
Subroutine;
SetFacing;
}
actions
{
If(Global.playerFacing == True);
Wait(0.001, Ignore Condition);
Set Facing(Players In Slot(0, Team 1), Direction Towards(Global.tp1, Global.tp2), To World);
Set Facing(Players In Slot(0, Team 2), Direction Towards(Global.tp2, Global.tp1), To World);
End;
}
}
rule("Kill")
{
event
{
Player Died;
All;
All;
}
conditions
{
Team Score(Team 1) != Global.goalScore;
Team Score(Team 2) != Global.goalScore;
}
actions
{
Global.heroListPos += 1;
Global.rounds += 1;
Wait(0.200, Ignore Condition);
Call Subroutine(SwitchHero);
Call Subroutine(Teleport);
Resurrect(All Players(All Teams));
Call Subroutine(SetFacing);
Call Subroutine(Slowmo);
}
}
rule("HUD (on)")
{
event
{
Ongoing - Each Player;
All;
All;
}
conditions
{
Is Game In Progress == True;
Global.showHUD == True;
}
actions
{
Destroy All HUD Text;
Wait(0.250, Ignore Condition);
Create HUD Text(Event Player, Null, Null, Custom String("Damage"), Left, 1, White, White, White, Visible To and String,
Default Visibility);
Create HUD Text(Event Player, Null, Null, Custom String("{1}: {0}", Round To Integer(Players In Slot(0, Team 1).damage,
To Nearest), Players In Slot(0, Team 1)), Left, 2, White, White, White, Visible To and String, Default Visibility);
Create HUD Text(Event Player, Null, Null, Custom String("{1}: {0}", Round To Integer(Players In Slot(0, Team 2).damage,
To Nearest), Players In Slot(0, Team 2)), Left, 3, White, White, White, Visible To and String, Default Visibility);
}
}
rule("HUD (off)")
{
event
{
Ongoing - Each Player;
All;
All;
}
conditions
{
Is Game In Progress == True;
Global.showHUD == False;
}
actions
{
Destroy All HUD Text;
}
}
rule("DMG")
{
event
{
Player Dealt Damage;
All;
All;
}
conditions
{
Victim != Event Player;
}
actions
{
Event Player.damage += Event Damage;
}
}
rule("More Rounds than Heroes = Set to Round 0")
{
event
{
Ongoing - Global;
}
conditions
{
Global.heroListPos == Count Of(Global.heroplayed);
}
actions
{
Global.heroListPos = 0;
}
}
rule("Countdown (Join)")
{
event
{
Player Joined Match;
All;
All;
}
conditions
{
Is In Setup == True;
Event Player.O != True;
}
actions
{
Event Player.O = True;
Wait(0.250, Ignore Condition);
Call Subroutine(Teleport);
Call Subroutine(SetFacing);
Create HUD Text(Event Player, Custom String("Played Hero: {0} {1}", Global.heroplayed[0], Hero Icon String(Global.heroplayed[0])),
Null, Null, Top, 0, Team 1, White, White, Visible To and String, Default Visibility);
}
}
rule("Countdown (each)")
{
event
{
Ongoing - Each Player;
All;
All;
}
conditions
{
Is In Setup == True;
Event Player.O != True;
}
actions
{
Event Player.O = True;
Wait(0.250, Ignore Condition);
Call Subroutine(Teleport);
Call Subroutine(SetFacing);
Create HUD Text(Event Player, Custom String("Played Hero: {0} {1}", Global.heroplayed[0], Hero Icon String(Global.heroplayed[0])),
Null, Null, Top, 0, Team 1, White, White, Visible To and String, Default Visibility);
}
}
rule("2nd Hero")
{
event
{
Ongoing - Global;
}
actions
{
"A second Hero is needed to reset the Heroes after one round"
Global.hero2nd = Hero(Winston);
}
}
rule("If Winston")
{
event
{
Ongoing - Global;
}
conditions
{
Global.heroplayed == Hero(Winston);
}
actions
{
"The default 2nd hero is Winston. So when he is played, this is used as a backup (lol, who plays Winston 1v1? But if someone gets the stupid idea, it works :D)"
"The default 2nd hero is Winston. So when he is played, this is used as a backup (lol, who plays Winston 1v1? But if someone gets that stupid idea, it works :D)"
Global.hero2nd = Hero(Ana);
}
}
disabled rule("[Debug] Switch Hero")
{
event
{
Ongoing - Each Player;
All;
All;
}
conditions
{
Is Button Held(Event Player, Interact) == True;
}
actions
{
Call Subroutine(SwitchHero);
Global.heroListPos += 1;
}
}
disabled rule("[Debug] Dummy")
{
event
{
Ongoing - Each Player;
All;
All;
}
conditions
{
Is Button Held(Event Player, Reload) == True;
Is Game In Progress != True;
}
actions
{
Create Dummy Bot(Hero(Ana), Team 2, -1, Event Player, Vector(0, 0, 0));
}
}