Create
Return to post

Comparing difference between and

View raw
  • settings
  • {
  • main
  • {
  • Description: "12v12 GOATs Duel by andygmb | Youtube.com/AndyB | Workshop.codes/PVPEO"
  • }
  • lobby
  • {
  • Allow Players Who Are In Queue: Yes
  • Match Voice Chat: Enabled
  • Max Spectators: 12
  • Max Team 1 Players: 1
  • Max Team 2 Players: 1
  • Return To Lobby: Never
  • }
  • modes
  • {
  • Assault
  • Control
  • {
  • Score To Win: 1
  • }
  • Escort
  • Hybrid
  • General
  • {
  • Game Mode Start: Immediately
  • Hero Limit: Off
  • Skins: Off
  • }
  • }
  • extensions
  • {
  • Spawn More Dummy Bots
  • }
  • }
  • variables
  • {
  • global:
  • 19: team_iter
  • player:
  • 0: heroes
  • 1: buttons
  • 2: current_button
  • 3: max_health
  • 4: current_health
  • 5: current_health_percent
  • 6: bots
  • 10: dummy_bot_parent
  • 11: bot_locations
  • 12: heal_me
  • }
  • subroutines
  • {
  • 0: player_init
  • }
  • rule("Player vars init")
  • {
  • event
  • {
  • Subroutine;
  • player_init;
  • }
  • actions
  • {
  • Set Max Health(Event Player, 1000);
  • Event Player.bots = Array();
  • Event Player.max_health = 20000;
  • Event Player.current_health = Event Player.max_health;
  • Event Player.current_health_percent = Event Player.current_health / (Event Player.max_health / 100);
  • Event Player.heroes = Array(Hero(Reinhardt), Hero(Roadhog), Hero(Winston), Hero(D.Va), Hero(Zarya), Hero(Moira), Hero(Brigitte),
  • Hero(Ana), Hero(Lúcio), Hero(Zenyatta), Hero(Lúcio));
  • Event Player.bot_locations = Array(Null, Vector(0, 0, 1), Vector(0.750, 0, 0.750), Vector(1, 0, 0), Vector(-1, 0, 0), Vector(
  • -0.750, 0, 0.750), Vector(0, 0, -1), Vector(-0.750, 0, -0.750), Vector(0.750, 0, -0.750), Vector(-0.300, 0, -0.500), Vector(
  • 0.300, 0, -0.500));
  • Event Player.buttons = Array(Button(Primary Fire), Button(Secondary Fire), Button(Ability 1), Button(Ability 2), Button(Ultimate),
  • Button(Jump), Button(Crouch), Button(Melee), Button(Reload));
  • Create Progress Bar In-World Text(All Players(Opposite Team Of(Team Of(Event Player))), Event Player.current_health_percent,
  • Custom String("{0}/{1}", Event Player.current_health, Event Player.max_health), Update Every Frame(Position Of(Event Player)
  • + Vector(0, 2, 0)), 0.700, Clip Against Surfaces, Custom Color((1.200 - Event Player.current_health_percent * 0.010) * 255,
  • Event Player.current_health_percent * 0.010 * 0.900 * 255, 0, 255), Color(White), Visible To Position Values and Color,
  • Visible Always);
  • Create Progress Bar HUD Text(Event Player, Event Player.current_health_percent, Custom String("{0}/{1}",
  • Event Player.current_health, Event Player.max_health), Top, 10, Custom Color((
  • 1.200 - Event Player.current_health_percent * 0.010) * 255, Event Player.current_health_percent * 0.010 * 0.900 * 255, 0, 255),
  • Color(White), Visible To Values and Color, Default Visibility);
  • }
  • }
  • rule("Dummy bot init")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Is Dummy Bot(Event Player) == True;
  • Is Game In Progress == True;
  • }
  • actions
  • {
  • Event Player.dummy_bot_parent = First Of(Filtered Array(All Players(Team Of(Event Player)), !Is Dummy Bot(Current Array Element)));
  • Start Scaling Player(Event Player, 0.700, True);
  • Modify Player Variable(Event Player.dummy_bot_parent, bots, Append To Array, Event Player);
  • Start Forcing Dummy Bot Name(Event Player, Custom String("{0}", Event Player.dummy_bot_parent));
  • Disable Nameplates(Event Player, All Players(All Teams));
  • Start Facing(Event Player, Direction Towards(Eye Position(Event Player), Ray Cast Hit Position(Eye Position(
  • Event Player.dummy_bot_parent), Eye Position(Event Player.dummy_bot_parent) + Facing Direction Of(
  • Event Player.dummy_bot_parent) * 1000, All Players(Opposite Team Of(Team Of(Event Player))), All Players(Team Of(
  • Event Player)), True)), 360, To World, Direction and Turn Rate);
  • Attach Players(Event Player, Event Player.dummy_bot_parent, Vector(X Component Of(
  • Event Player.dummy_bot_parent.bot_locations[Slot Of(Event Player)]), 0, Z Component Of(
  • Event Player.dummy_bot_parent.bot_locations[Slot Of(Event Player)])));
  • }
  • }
  • rule("Player spawned, create dummy bots & setup camera")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Has Spawned(Event Player) == True;
  • Is Dummy Bot(Event Player) == False;
  • Is Game In Progress == True;
  • }
  • actions
  • {
  • Call Subroutine(player_init);
  • For Player Variable(Event Player, I, 0, Count Of(Event Player.heroes), 1);
  • Create Dummy Bot(Event Player.heroes[Event Player.I], Team Of(Event Player), -1, Position Of(Event Player), Vector(0, 0, 0));
  • Wait(0.016, Ignore Condition);
  • End;
  • "health is dealt with seperately"
  • Set Status(All Players(Team Of(Event Player)), Null, Unkillable, 9999);
  • Start Assist(All Players(Team Of(Event Player)), All Players(Team Of(Event Player)), None);
  • Start Camera(Event Player, Update Every Frame(Ray Cast Hit Position(Eye Position(Event Player), World Vector Of(Vector(0, 2, -3),
  • Event Player, Rotation And Translation), Null, Event Player, True)), Update Every Frame(Eye Position(Event Player)
  • + Facing Direction Of(Event Player) * 1000), 20);
  • }
  • }
  • rule("Buttons")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Is True For Any(Event Player.buttons, Is Button Held(Event Player, Current Array Element)) == True;
  • Is Dummy Bot(Event Player) == False;
  • Is Game In Progress == True;
  • }
  • actions
  • {
  • While(Is True For Any(Event Player.buttons, Is Button Held(Event Player, Current Array Element)));
  • For Player Variable(Event Player, I, 0, Count Of(Event Player.buttons), 1);
  • Event Player.current_button = Event Player.buttons[Event Player.I];
  • If(Is Button Held(Event Player, Event Player.current_button));
  • Start Holding Button(Event Player.bots, Event Player.current_button);
  • Else;
  • Stop Holding Button(Event Player.bots, Event Player.current_button);
  • End;
  • Wait(0.016, Ignore Condition);
  • End;
  • Wait(0.016, Ignore Condition);
  • End;
  • }
  • }
  • rule("Attach if detached somehow")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Is Dummy Bot(Event Player) == True;
  • Distance Between(Event Player, Event Player.dummy_bot_parent) > 3;
  • Is Game In Progress == True;
  • }
  • actions
  • {
  • Attach Players(Event Player, Event Player.dummy_bot_parent, Vector(X Component Of(
  • Event Player.dummy_bot_parent.bot_locations[Slot Of(Event Player)]), 0, Z Component Of(
  • Event Player.dummy_bot_parent.bot_locations[Slot Of(Event Player)])));
  • Wait(0.250, Ignore Condition);
  • Loop If Condition Is True;
  • }
  • }
  • rule("Took Dmg")
  • {
  • event
  • {
  • Player Took Damage;
  • All;
  • All;
  • }
  • conditions
  • {
  • Is Game In Progress == True;
  • }
  • actions
  • {
  • If(Is Dummy Bot(Event Player));
  • Damage(Event Player.dummy_bot_parent, Attacker, Event Damage);
  • Else;
  • Event Player.current_health -= Event Damage;
  • End;
  • }
  • }
  • rule("Got Healed")
  • {
  • event
  • {
  • Player Received Healing;
  • All;
  • All;
  • }
  • conditions
  • {
  • Is Game In Progress == True;
  • }
  • actions
  • {
  • If(Is Dummy Bot(Event Player));
  • Heal(Event Player.dummy_bot_parent, Healer, Event Healing);
  • Else;
  • Event Player.current_health += Event Healing / 5;
  • End;
  • }
  • }
  • rule("Player died, kill all attached bots and self")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Event Player.current_health <= 1;
  • Has Spawned(Event Player) == True;
  • Is Dummy Bot(Event Player) == False;
  • Is Game In Progress == True;
  • }
  • actions
  • {
  • Clear Status(All Players(Team Of(Event Player)), Unkillable);
  • Wait(0.016, Ignore Condition);
  • Kill(All Players(Team Of(Event Player)), Players In Slot(0, Opposite Team Of(Team Of(Event Player))));
  • If(Hero Of(Event Player) == Hero(D.Va));
  • Wait Until(Is In Alternate Form(Event Player), 7);
  • While(Is In Alternate Form(Event Player));
  • Kill(Event Player, Players In Slot(0, Opposite Team Of(Team Of(Event Player))));
  • Wait(0.300, Ignore Condition);
  • End;
  • End;
  • Wait Until(Is Alive(Event Player), 99999);
  • Event Player.current_health = Event Player.max_health;
  • Event Player.current_health_percent = Event Player.current_health / (Event Player.max_health / 100);
  • Set Status(All Players(Team Of(Event Player)), Null, Unkillable, 9999);
  • }
  • }
  • rule("Baby D.Va gets back in mech automatically")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Hero Of(Event Player) == Hero(D.Va);
  • Is Dummy Bot(Event Player) == True;
  • Is In Alternate Form(Event Player) == True;
  • Is Game In Progress == True;
  • }
  • actions
  • {
  • Set Ultimate Charge(Event Player, 100);
  • While(Is In Alternate Form(Event Player));
  • Press Button(Event Player, Button(Ultimate));
  • Wait(0.250, Ignore Condition);
  • End;
  • }
  • }
  • rule("Update health percentage")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Is Dummy Bot(Event Player) == False;
  • Is Game In Progress == True;
  • }
  • actions
  • {
  • Event Player.current_health_percent = Event Player.current_health / (Event Player.max_health / 100);
  • Wait(0.016, Ignore Condition);
  • Loop;
  • }
  • }
  • rule("Stop health from going below 0")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Event Player.current_health < 0;
  • Is Dummy Bot(Event Player) == False;
  • Is Game In Progress == True;
  • }
  • actions
  • {
  • Event Player.current_health = 0;
  • Wait(0.016, Ignore Condition);
  • Loop If Condition Is True;
  • }
  • }
  • rule("If you died, kill all your bots in a loop til you're alive")
  • {
  • event
  • {
  • Player Died;
  • All;
  • All;
  • }
  • conditions
  • {
  • Players In Slot(0, Opposite Team Of(Team Of(Event Player))) != Null;
  • Is Game In Progress == True;
  • }
  • actions
  • {
  • Event Player.current_health = 0;
  • While(Count Of(All Living Players(Team Of(Event Player))) > 0);
  • Kill(Event Player.bots, Players In Slot(0, Opposite Team Of(Team Of(Event Player))));
  • Wait(0.250, Ignore Condition);
  • End;
  • Players In Slot(0, Opposite Team Of(Team Of(Event Player))).heal_me = True;
  • Wait Until(Is Alive(Event Player), 99999);
  • Teleport(Event Player.bots, Position Of(Event Player) + Vector(0, 5, 0));
  • Wait(0.100, Ignore Condition);
  • Respawn(Event Player.bots);
  • }
  • }
  • rule("Rein sometimes can't use his ult because he's attached. If he's using his ult for more than 15 seconds then detach for a sec")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Hero Of(Event Player) == Hero(Reinhardt);
  • Is Dummy Bot(Event Player) == True;
  • Is Using Ultimate(Event Player) == True;
  • Is Game In Progress == True;
  • }
  • actions
  • {
  • Wait(15, Abort When False);
  • Detach Players(Event Player);
  • Wait(1, Ignore Condition);
  • Attach Players(Event Player, Event Player.dummy_bot_parent, Vector(X Component Of(
  • Event Player.dummy_bot_parent.bot_locations[Slot Of(Event Player)]), 0, Z Component Of(
  • Event Player.dummy_bot_parent.bot_locations[Slot Of(Event Player)])));
  • }
  • }
  • rule("Player left match")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Has Spawned(Event Player) == True;
  • Is Dummy Bot(Event Player) == False;
  • Players In Slot(0, Opposite Team Of(Team Of(Event Player))) == Null;
  • Is Game In Progress == True;
  • }
  • actions
  • {
  • For Global Variable(team_iter, 0, 12, 1);
  • Destroy Dummy Bot(Opposite Team Of(Team Of(Event Player)), Global.team_iter);
  • Wait(0.016, Ignore Condition);
  • End;
  • Create HUD Text(All Players(All Teams), Custom String("team 1 {0}", Team 1), Null, Null, Left, 0, Color(White), Color(White),
  • Color(White), Visible To and String, Visible Always);
  • }
  • }
  • rule("Heal to full")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Event Player.heal_me == True;
  • }
  • actions
  • {
  • Chase Player Variable At Rate(Event Player, current_health, Event Player.max_health, 2500, Destination and Rate);
  • Wait(10, Ignore Condition);
  • Stop Chasing Player Variable(Event Player, current_health);
  • Heal(Event Player, Event Player, 100000);
  • disabled Players In Slot(0, Opposite Team Of(Team Of(Event Player))).current_health = Absolute Value(Event Player.max_health);
  • Event Player.heal_me = False;
  • }
  • }
  • rule("In setup")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Is In Setup == True;
  • }
  • actions
  • {
  • Set Match Time(3);
  • }
  • }
  • rule("In assembling heroes")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Is Assembling Heroes == True;
  • }
  • actions
  • {
  • Set Match Time(3);
  • }
  • }
  • rule("Copy communications")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Is Dummy Bot(Event Player) == False;
  • Is Communicating Any(Event Player) == True;
  • }
  • actions
  • {
  • If(Is Communicating(Event Player, Countdown));
  • Communicate(Event Player.bots, Countdown);
  • Else If(Is Communicating(Event Player, Hello));
  • Communicate(Event Player.bots, Hello);
  • Else If(Is Communicating(Event Player, Thanks));
  • Communicate(Event Player.bots, Thanks);
  • Else If(Is Communicating(Event Player, Need Healing));
  • Communicate(Event Player.bots, Need Healing);
  • Else If(Is Communicating(Event Player, Yes));
  • Communicate(Event Player.bots, Yes);
  • Else If(Is Communicating(Event Player, No));
  • Communicate(Event Player.bots, No);
  • Else If(Is Communicating(Event Player, Goodbye));
  • Communicate(Event Player.bots, Goodbye);
  • Else If(Is Communicating(Event Player, Go));
  • Communicate(Event Player.bots, Go);
  • Else If(Is Communicating(Event Player, Ready));
  • Communicate(Event Player.bots, Ready);
  • Else If(Is Communicating(Event Player, Incoming));
  • Communicate(Event Player.bots, Incoming);
  • Else If(Is Communicating(Event Player, Sorry));
  • Communicate(Event Player.bots, Sorry);
  • End;
  • }
  • }
Join the Workshop.codes Discord