Return to post
- variables
- {
- global:
- 0: bot
- 1: bot2
- 2: bot3
- 3: damagePos
- 4: posBot
- 5: bot4
- 7: bot5
- 8: bot6
- 9: bot7
- 10: smallHitbox
- 11: bigHitbox
- 12: lastEffect
- player:
- 1: entities
- }
- subroutines
- {
- 0: Highlight
- }
- rule("init")
- {
- event
- {
- Ongoing - Global;
- }
- actions
- {
- Global.damagePos = Empty Array;
Create HUD Text(All Players(All Teams), Custom String("Hero number: {0}", Host Player.A + 1), Null, Null, Left, 0, White, White,
White, Visible To and String, Default Visibility);
- Create HUD Text(All Players(All Teams), Custom String("Hero {0} - {1}", Host Player.A + 1, All Heroes[Host Player.A]), Null, Null,
- Left, 0, White, White, White, Visible To and String, Default Visibility);
- Global.smallHitbox = Empty Array;
- Global.bigHitbox = Empty Array;
- Modify Global Variable(smallHitbox, Append To Array, Hero(Reaper));
- Modify Global Variable(smallHitbox, Append To Array, Hero(Tracer));
- Modify Global Variable(smallHitbox, Append To Array, Hero(Mercy));
- Modify Global Variable(smallHitbox, Append To Array, Hero(Hanzo));
- Modify Global Variable(smallHitbox, Append To Array, Hero(Pharah));
- Modify Global Variable(smallHitbox, Append To Array, Hero(Widowmaker));
- Modify Global Variable(smallHitbox, Append To Array, Hero(Symmetra));
- Modify Global Variable(smallHitbox, Append To Array, Hero(Zenyatta));
- Modify Global Variable(smallHitbox, Append To Array, Hero(Genji));
- Modify Global Variable(smallHitbox, Append To Array, Hero(McCree));
- Modify Global Variable(smallHitbox, Append To Array, Hero(Junkrat));
- Modify Global Variable(smallHitbox, Append To Array, Hero(Zarya));
- Modify Global Variable(smallHitbox, Append To Array, Hero(Soldier: 76));
- Modify Global Variable(smallHitbox, Append To Array, Hero(Lúcio));
- Modify Global Variable(smallHitbox, Append To Array, Hero(Mei));
- Modify Global Variable(smallHitbox, Append To Array, Hero(Sombra));
- Modify Global Variable(smallHitbox, Append To Array, Hero(Ana));
- Modify Global Variable(smallHitbox, Append To Array, Hero(Brigitte));
- Modify Global Variable(smallHitbox, Append To Array, Hero(Moira));
- Modify Global Variable(smallHitbox, Append To Array, Hero(Ashe));
- Modify Global Variable(smallHitbox, Append To Array, Hero(Echo));
- Modify Global Variable(smallHitbox, Append To Array, Hero(Baptiste));
- Modify Global Variable(bigHitbox, Append To Array, Hero(Reinhardt));
- Modify Global Variable(bigHitbox, Append To Array, Hero(Bastion));
- Modify Global Variable(bigHitbox, Append To Array, Hero(Roadhog));
- Modify Global Variable(bigHitbox, Append To Array, Hero(Doomfist));
- Modify Global Variable(bigHitbox, Append To Array, Hero(Orisa));
- }
- }
- rule("player init")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
- Is Dummy Bot(Event Player) == False;
- }
- actions
- {
- Teleport(Event Player, Vector(10, 0, 2.500));
- Set Facing(Event Player, Direction Towards(Eye Position(Event Player), Vector(19.495, 3, 2.500)), To World);
- Event Player.entities = Empty Array;
- Call Subroutine(Highlight);
- }
- }
- rule("Dealt damage")
- {
- event
- {
- Player Dealt Damage;
- All;
- All;
- }
- actions
- {
- Event Player.R = Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player) + Facing Direction Of(Event Player)
- * 200, All Players(All Teams), Event Player, True);
- Create Effect(All Players(All Teams), Sphere, Orange, Event Player.R, 0.020, None);
- Modify Player Variable(Event Player, entities, Append To Array, Last Created Entity);
Wait(0.160, Ignore Condition);
- Wait(0.144, Ignore Condition);
- }
- }
- rule("Primary fire")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
- Is Button Held(Event Player, Primary Fire) == True;
- }
- actions
- {
- Event Player.R = Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player) + Facing Direction Of(Event Player)
- * 200, All Players(All Teams), Event Player, True);
- Modify Global Variable(damagePos, Append To Array, Event Player.R);
- }
- }
- rule("Reload (destroy effects)")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
- Is Button Held(Event Player, Reload) == True;
- }
- actions
- {
- For Player Variable(Event Player, C, 0, Count Of(Event Player.entities), 1);
- Destroy Effect(Event Player.entities[Event Player.C]);
- Wait(0.016, Ignore Condition);
- End;
- Event Player.entities = Empty Array;
- }
- }
- rule("F (change bot hero)")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
- Is Button Held(Event Player, Interact) == True;
- }
- actions
- {
- If(Event Player.A >= 31);
- Event Player.A = 0;
- Else;
- Event Player.A += 1;
- End;
- Start Forcing Player To Be Hero(Global.bot, All Heroes[Event Player.A]);
- Teleport(Global.bot, Vector(19.495, 1, -10));
- Start Forcing Player To Be Hero(Global.bot2, All Heroes[Event Player.A]);
- Teleport(Global.bot2, Vector(19.495, 1, -5));
- Call Subroutine(Highlight);
- Wait(0.500, Ignore Condition);
- }
- }
- rule("Big hitbox")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
- Has Spawned(Host Player) == True;
- Is Dummy Bot(Event Player) == False;
- }
- actions
- {
- Create Dummy Bot(All Heroes[0], All Teams, -1, Vector(19.495, 1.700, -10), Direction Towards(Vector(19.495, 1.700, 0), Vector(0, 0,
- 0)));
- Global.bot = Last Created Entity;
- Set Gravity(Global.bot, Absolute Value(0));
- Wait(2.500, Ignore Condition);
- Set Status(Global.bot, Null, Unkillable, 9999);
- Teleport(Global.bot, Vector(19.495, 1, -10));
- Wait(0.500, Ignore Condition);
- Global.posBot = Position Of(Global.bot);
- Create Effect(All Players(All Teams), Sphere, Red, Position Of(Global.bot) + Vector(0, 1.600, 0), 1.200,
- Visible To Position and Radius);
- Create Effect(All Players(All Teams), Sphere, Red, Position Of(Global.bot) + Vector(0, 1.300, 0), 1.200,
- Visible To Position and Radius);
- Create Effect(All Players(All Teams), Sphere, Red, Position Of(Global.bot) + Vector(0, 1, 0), 1.200,
- Visible To Position and Radius);
- Create Effect(All Players(All Teams), Sphere, Red, Position Of(Global.bot) + Vector(0, 0.700, 0), 1.200,
- Visible To Position and Radius);
- Create In-World Text(All Players(All Teams), Custom String("2.4m x 3.3m"), Vector(20, 4, -10), 1.500, Do Not Clip,
- Visible To Position and String, White, Default Visibility);
- }
- }
- rule("Small hitbox")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
- Has Spawned(Host Player) == True;
- Is Dummy Bot(Event Player) == False;
- }
- actions
- {
- Create Dummy Bot(All Heroes[0], All Teams, -1, Vector(19.495, 1.700, -5), Direction Towards(Vector(19.495, 1.700, 0), Vector(0, 0,
- 0)));
- Global.bot2 = Last Created Entity;
- Set Gravity(Global.bot2, Absolute Value(0));
- Wait(2.500, Ignore Condition);
- Set Status(Global.bot2, Null, Unkillable, 9999);
- Teleport(Global.bot2, Vector(19.495, 1, -5));
- Wait(0.500, Ignore Condition);
- Create Effect(All Players(All Teams), Sphere, Red, Position Of(Global.bot2) + Vector(0, 1.500, 0), 1,
- Visible To Position and Radius);
- Create Effect(All Players(All Teams), Sphere, Red, Position Of(Global.bot2) + Vector(0, 1.200, 0), 1,
- Visible To Position and Radius);
- Create Effect(All Players(All Teams), Sphere, Red, Position Of(Global.bot2) + Vector(0, 0.900, 0), 1,
- Visible To Position and Radius);
- Create Effect(All Players(All Teams), Sphere, Red, Position Of(Global.bot2) + Vector(0, 0.500, 0), 1,
- Visible To Position and Radius);
- Create In-World Text(All Players(All Teams), Custom String("2m x 3m"), Vector(20, 4, -5), 1.500, Do Not Clip,
- Visible To Position and String, White, Default Visibility);
- }
- }
- rule("create torb bot")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
- Has Spawned(Host Player) == True;
- Is Dummy Bot(Event Player) == False;
- }
- actions
- {
- Create Dummy Bot(Hero(Torbjörn), All Teams, -1, Vector(19.495, 1.700, 0), Direction Towards(Vector(19.495, 1.700, 0), Vector(0, 0,
- 0)));
- Global.bot3 = Last Created Entity;
- Set Gravity(Global.bot3, Absolute Value(0));
- Wait(2.500, Ignore Condition);
- Set Status(Global.bot3, Null, Unkillable, 9999);
- Teleport(Global.bot3, Vector(19.495, 1, 0));
- Wait(0.500, Ignore Condition);
- Create Effect(All Players(All Teams), Sphere, Blue, Position Of(Global.bot3) + Vector(0, 1.500, 0), 1,
- Visible To Position and Radius);
- Create Effect(All Players(All Teams), Sphere, Red, Position Of(Global.bot3) + Vector(0, 1.050, 0), 1,
- Visible To Position and Radius);
- Create Effect(All Players(All Teams), Sphere, Red, Position Of(Global.bot3) + Vector(0, 0.850, 0), 1,
- Visible To Position and Radius);
- Create Effect(All Players(All Teams), Sphere, Red, Position Of(Global.bot3) + Vector(0, 0.500, 0), 1,
- Visible To Position and Radius);
- Create In-World Text(All Players(All Teams), Custom String("2m x 2.55m"), Vector(20, 4, 0), 1.500, Do Not Clip,
- Visible To Position and String, White, Default Visibility);
- }
- }
- rule("create hammond bot")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
- Has Spawned(Host Player) == True;
- Is Dummy Bot(Event Player) == False;
- }
- actions
- {
- Create Dummy Bot(Hero(Wrecking Ball), All Teams, -1, Vector(19.495, 1.700, 5), Direction Towards(Vector(19.495, 1.700, 0), Vector(
- 0, 0, 0)));
- Global.bot4 = Last Created Entity;
- Set Gravity(Global.bot4, Absolute Value(0));
- Wait(2.500, Ignore Condition);
- Set Status(Global.bot4, Null, Unkillable, 9999);
- Teleport(Global.bot4, Vector(19.495, 1, 5));
- Wait(0.500, Ignore Condition);
- Create Effect(All Players(All Teams), Sphere, Red, Global.bot4, 1.500, Visible To Position and Radius);
- Create Effect(All Players(All Teams), Sphere, Blue, Position Of(Global.bot4) + Vector(0, 1.600, 0), 1.200,
- Visible To Position and Radius);
- Create Effect(All Players(All Teams), Sphere, Blue, Position Of(Global.bot4) + Vector(0, 1.300, 0), 1.200,
- Visible To Position and Radius);
- Create Effect(All Players(All Teams), Sphere, Blue, Position Of(Global.bot4) + Vector(0, 1, 0), 1.200,
- Visible To Position and Radius);
- Create Effect(All Players(All Teams), Sphere, Blue, Position Of(Global.bot4) + Vector(0, 0.750, 0), 1.200,
- Visible To Position and Radius);
- Create In-World Text(All Players(All Teams), Custom String("3m x 3m"), Vector(20, 4, 5), 1.500, Do Not Clip,
- Visible To Position and String, White, Default Visibility);
- }
- }
- rule("create D.va bot")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
- Has Spawned(Host Player) == True;
- Is Dummy Bot(Event Player) == False;
- }
- actions
- {
- Create Dummy Bot(Hero(Roadhog), All Teams, -1, Vector(19.495, 1.700, 10), Direction Towards(Vector(19.495, 1.700, 0), Vector(0, 0,
- 0)));
- Global.bot5 = Last Created Entity;
- Set Gravity(Global.bot5, Absolute Value(0));
- Wait(3, Ignore Condition);
- Set Status(Global.bot5, Null, Unkillable, 9999);
- Teleport(Global.bot5, Vector(19.495, 1, 10));
- Start Forcing Player To Be Hero(Global.bot5, Hero(D.Va));
- Wait(1, Ignore Condition);
- Create Effect(All Players(All Teams), Sphere, Blue, Position Of(Global.bot5) + Vector(0, 1.600, 0), 1.200,
- Visible To Position and Radius);
- Create Effect(All Players(All Teams), Sphere, Red, Position Of(Global.bot5) + Vector(0, 1.300, 0), 1.200,
- Visible To Position and Radius);
- Create Effect(All Players(All Teams), Sphere, Red, Position Of(Global.bot5) + Vector(0, 1, 0), 1.200,
- Visible To Position and Radius);
- Create Effect(All Players(All Teams), Sphere, Red, Position Of(Global.bot5) + Vector(0, 0.700, 0), 1.200,
- Visible To Position and Radius);
- Create In-World Text(All Players(All Teams), Custom String("2.4m x 3m"), Vector(20, 4, 10), 1.500, Do Not Clip,
- Visible To Position and String, White, Default Visibility);
- }
- }
- rule("create sigma bot")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
- Has Spawned(Host Player) == True;
- Is Dummy Bot(Event Player) == False;
- }
- actions
- {
- Create Dummy Bot(Hero(Sigma), All Teams, -1, Vector(19.495, 1.700, 15), Direction Towards(Vector(19.495, 1.700, 0), Vector(0, 0,
- 0)));
- Global.bot6 = Last Created Entity;
- Set Gravity(Global.bot6, Absolute Value(0));
- Wait(2.500, Ignore Condition);
- Set Status(Global.bot6, Null, Unkillable, 9999);
- Global.damagePos = Empty Array;
- Teleport(Global.bot6, Vector(19.495, 1, 15));
- Wait(0.500, Ignore Condition);
- Global.posBot = Position Of(Global.bot6);
- Create Effect(All Players(All Teams), Sphere, Blue, Position Of(Global.bot6) + Vector(0, 1.600, 0), 1.200,
- Visible To Position and Radius);
- Create Effect(All Players(All Teams), Sphere, Red, Position Of(Global.bot6) + Vector(0, 1.800, 0), 1.200,
- Visible To Position and Radius);
- Create Effect(All Players(All Teams), Sphere, Red, Position Of(Global.bot6) + Vector(0, 1.300, 0), 1.200,
- Visible To Position and Radius);
- Create Effect(All Players(All Teams), Sphere, Red, Position Of(Global.bot6) + Vector(0, 1, 0), 1.200,
- Visible To Position and Radius);
- Create Effect(All Players(All Teams), Sphere, Red, Position Of(Global.bot6) + Vector(0, 0.700, 0), 1.200,
- Visible To Position and Radius);
- Teleport(Event Player, Vector(10, 0, 2.500));
- Set Facing(Event Player, Direction Towards(Eye Position(Event Player), Vector(19.495, 3, 2.500)), To World);
- Create In-World Text(All Players(All Teams), Custom String("2.4m x 3.5m"), Vector(20, 4, 15), 1.500, Do Not Clip,
- Visible To Position and String, White, Default Visibility);
- }
- }
- rule("create winston bot")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
- Has Spawned(Host Player) == True;
- Is Dummy Bot(Event Player) == False;
- }
- actions
- {
- Create Dummy Bot(Hero(Winston), All Teams, -1, Vector(19.495, 1.700, 15), Direction Towards(Vector(19.495, 1.700, 0), Vector(0, 0,
- 0)));
- Global.bot7 = Last Created Entity;
- Set Gravity(Global.bot7, Absolute Value(0));
- Wait(2.500, Ignore Condition);
- Set Status(Global.bot7, Null, Unkillable, 9999);
- Teleport(Global.bot7, Vector(19.495, 6, 15));
- Wait(0.500, Ignore Condition);
- Create Effect(All Players(All Teams), Sphere, Blue, Position Of(Global.bot7) + Vector(0, 1.600, 0), 1.200,
- Visible To Position and Radius);
- Create Effect(All Players(All Teams), Sphere, Red, Position Of(Global.bot7) + Vector(0, 1.800, 0), 1.200,
- Visible To Position and Radius);
- Create Effect(All Players(All Teams), Sphere, Red, Position Of(Global.bot7) + Vector(0, 1.300, 0), 1.200,
- Visible To Position and Radius);
- Create Effect(All Players(All Teams), Sphere, Red, Position Of(Global.bot7) + Vector(0, 1, 0), 1.200,
- Visible To Position and Radius);
- Create Effect(All Players(All Teams), Sphere, Red, Position Of(Global.bot7) + Vector(0, 0.700, 0), 1.200,
- Visible To Position and Radius);
- }
- }
- rule("highlight bot")
- {
- event
- {
- Subroutine;
- Highlight;
- }
- actions
- {
- Destroy Effect(Global.lastEffect);
- If(Array Contains(Global.smallHitbox, All Heroes[Host Player.A]) == True);
- Create Effect(All Players(All Teams), Ring, Green, Vector(19, 0, -5), 0.600, Visible To Position and Radius);
- Else If(Array Contains(Global.bigHitbox, All Heroes[Host Player.A]) == True);
- Create Effect(All Players(All Teams), Ring, Green, Vector(19, 0, -10), 0.600, Visible To Position and Radius);
- Else If(All Heroes[Host Player.A] == Hero(Torbjörn));
- Create Effect(All Players(All Teams), Ring, Green, Vector(19, 0, 0), 0.600, Visible To Position and Radius);
- Else If(All Heroes[Host Player.A] == Hero(Wrecking Ball));
- Create Effect(All Players(All Teams), Ring, Green, Vector(19, 0, 5), 0.600, Visible To Position and Radius);
- Else If(All Heroes[Host Player.A] == Hero(D.Va));
- Create Effect(All Players(All Teams), Ring, Green, Vector(19, 0, 10), 0.600, Visible To Position and Radius);
- Else If(All Heroes[Host Player.A] == Hero(Sigma));
- Create Effect(All Players(All Teams), Ring, Green, Vector(19, 0, 15), 0.600, Visible To Position and Radius);
- Else If(All Heroes[Host Player.A] == Hero(Winston));
- Create Effect(All Players(All Teams), Ring, Green, Vector(19, 0, 15), 0.600, Visible To Position and Radius);
- End;
- Global.lastEffect = Last Created Entity;
- }
- }