Set Global Variable(willAttackPlayers, Workshop Setting Toggle(Custom String("Bots", Null, Null, Null), Custom String("Attack players (shoot sleep dart, chase, and yeet)", Null, Null, Null), True, 0));
Set Global Variable(willEscape, Workshop Setting Toggle(Custom String("Bots", Null, Null, Null), Custom String("Bots will attempt to escape", Null, Null, Null), True, 0));
Set Global Variable(willJump, Workshop Setting Toggle(Custom String("Bots", Null, Null, Null), Custom String("Bots will jump", Null, Null, Null), True, 0));
Set Global Variable(willRoam, Workshop Setting Toggle(Custom String("Bots", Null, Null, Null), Custom String("Bots will roam around the map", Null, Null, Null), True, 0));
Set Global Variable(willUlt, Workshop Setting Toggle(Custom String("Bots", Null, Null, Null), Custom String("Bots will use ultimate", Null, Null, Null), True, 0));
If(Compare(Global Variable(spawnAI), ==, True));
Create HUD Text(All Players(Team(All)), Null, Null, Custom String("{0} {1}", Global Variable(stringAnaBotSpawn), Count Of(Filtered Array(All Players(Team(All)), Is Dummy Bot(Current Array Element))), Null), Left, 1, Null, Null, Color(White), Visible To And String, Default Visibility);
Set Global Variable(stringSubtitle, Custom String("Created by: {0}. Version: {1}", Global.stringCreator, Global.stringVersion, Null));
Set Global Variable(stringLeft, Custom String(": to pick up sleeping player", Null, Null, Null));
Set Global Variable(stringRight, Custom String(": to yeet carried player", Null, Null, Null));
// Action count: 15
actions
{
Set Global Variable(stringSubtitle, Custom String("Created by: {0}. Version: {1}", Global Variable(stringCreator), Global Variable(stringVersion), Null));
Set Global Variable(stringLeft, Custom String(" to pick up sleeping player", Null, Null, Null));
Set Global Variable(stringRight, Custom String(" to yeet carried player", Null, Null, Null));
Set Global Variable(stringObjective, Custom String("Yeet sleeping players off the island!", Null, Null, Null));
Set Global Variable(stringPick, Custom String("Picked up", Null, Null, Null));
Set Global Variable(stringEscape, Custom String(": To escape her grasp!", Null, Null, Null));
Set Global Variable(stringDiscord, Custom String("Join the discord: {0} (All caps)", Global.stringDiscordLink, Null, Null));
Set Global Variable(stringProject, Custom String("Project: {0}", Global.stringProjectLink, Null, Null));
Set Global Variable(stringUltEscape, Custom String(": To gain a speed boost and wake up if asleep!", Null, Null, Null));
Set Global Variable(stringEscape, Custom String(" to escape her grasp!", Null, Null, Null));
Set Global Variable(stringDiscord, Custom String("Join the discord: {0} (All caps)", Global Variable(stringDiscordLink), Null, Null));
Set Global Variable(stringProject, Custom String("Project: {0}", Global Variable(stringProjectLink), Null, Null));
Set Global Variable(stringUltEscape, Custom String(" to wake up and get a speed boost!", Null, Null, Null));
Set Global Variable(stringTranslation, Custom String("", Null, Null, Null));
Set Global Variable(stringGraspEscape, Custom String(" escaped!", Null, Null, Null));
Set Global Variable(stringGraspEscape, Custom String("escaped!", Null, Null, Null));
Set Global Variable(stringTitle, Custom String("Sleep 'N Yeet", Null, Null, Null));
Set Global Variable(stringAnaBotSpawn, Custom String("{0} Bots Enabled. Current count:", Ability Icon String(Hero(Echo), Button(Ultimate)), Null, Null));
Set Global Variable(stringGH, Custom String("{0} Certified by Grandeur Hammers", Ability Icon String(Hero(Torbjörn), Button(Ability 2)), Null, Null));
Create In-World Text(Filtered Array(All Players(Team(All)), And(And(Compare(Global Variable(leader), !=, Null), Compare(Current Array Element, !=, Global Variable(leader))), Is Alive(Global Variable(leader)))), Custom String("#1", Null, Null, Null), Global Variable(leader), 2, Clip Against Surfaces, Visible To And Position, Custom Color(255, 221, 0, 255), Default Visibility);
Create In-World Text(All Players(Team(All)), Global Variable(stringTitle), Vector(0, Add(20, Global Variable(y)), 113), 4, Clip Against Surfaces, Visible To String and Color, Custom Color(Global Variable(titleColorR), Global Variable(titleColorG), Global Variable(titleColorB), 255), Default Visibility);
Create In-World Text(All Players(Team(All)), Global Variable(stringSubtitle), Vector(0, Add(15, Global Variable(y)), 113), 2, Clip Against Surfaces, Visible To And String, Color(White), Default Visibility);
}
}
rule("Debug Mode Setup")
{
event
{
Subroutine;
debug;
}
// Action count: 2
actions
{
Create HUD Text(Host Player, Server Load Average, Custom String("Server Load Average", Null, Null, Null), Null, Left, 0, Color(White), Color(White), Color(White), Visible To And String, Default Visibility);
Create HUD Text(Host Player, Position Of(Host Player), Custom String("Host Player Position", Null, Null, Null), Null, Left, 1, Color(White), Color(White), Color(White), Visible To And String, Default Visibility);
}
}
rule("Initial Setup")
{
event
{
Ongoing - Global;
}
// Action count: 26
actions
{
Set Global Variable(isDebug, Workshop Setting Toggle(Custom String("Debug", Null, Null, Null), Custom String("Enable Debug HUD", Null, Null, Null), False, 0));
Set Global Variable(spawnPositionArray, Array(Vector(15, Global Variable(y), 15), Vector(10, Global Variable(y), 15), Vector(5, Global Variable(y), 15), Vector(Empty Array, Global Variable(y), 15), Vector(-5, Global Variable(y), 15), Vector(-10, Global Variable(y), 15), Vector(-15, Global Variable(y), 15), Vector(15, Global Variable(y), 10), Vector(15, Global Variable(y), 5), Vector(15, Global Variable(y), Empty Array), Vector(15, Global Variable(y), -5), Vector(15, Global Variable(y), -10), Vector(15, Global Variable(y), -15), Vector(10, Global Variable(y), -15), Vector(5, Global Variable(y), -15), Vector(Empty Array, Global Variable(y), -15), Vector(-5, Global Variable(y), -15), Vector(-10, Global Variable(y), -15), Vector(-15, Global Variable(y), -15), Vector(-15, Global Variable(y), 10), Vector(-15, Global Variable(y), 5), Vector(-15, Global Variable(y), Empty Array), Vector(-15, Global Variable(y), -5), Vector(-15, Global Variable(y), -10)));
Set Facing(Event Player, Direction Towards(Event Player, Vector(Empty Array, Subtract(Add(Global Variable(y), Eye Position(Event Player)), Position Of(Event Player)), Empty Array)), To World);
Set Player Variable(Event Player, ready, True);
}
}
rule ("New Player Setup") {
event {
rule("Chase Color")
{
event
{
Ongoing - Global;
}
// Action count: 19
actions
{
Chase Global Variable At Rate(titleColorB, 255, 450, Destination And Rate);
"Sometimes the array has a player that does not exist. This check will prevent a weird small message from being sent."
If(Compare(Value In Array(((Event Player).thrower).playerCarried, (Event Player).i), !=, Null));
Small Message((Event Player).thrower, Custom String("{0}{1}", Value In Array(((Event Player).thrower).playerCarried, (Event Player).i), Global.stringGraspEscape, Null));
Set Player Variable(Event Player, i, Index Of Array Value(Player Variable(Player Variable(Event Player, thrower), playersCarried), Event Player));
Small Message(Player Variable(Event Player, thrower), Custom String("{0} {1}", Event Player, Global Variable(stringGraspEscape), Null));
Modify Player Variable(Player Variable(Event Player, thrower), playersCarried, Remove From Array By Index, Player Variable(Event Player, i));
"Sometimes the array has a player that does not exist and/or by the time the small message is sent, player value is lost. This check will prevent a weird small message from being sent."If(Compare(Value In Array(Player Variable(Player Variable(Event Player, thrower), playersCarried), Player Variable(Event Player, i)), !=, Null));
Small Message(Player Variable(Event Player, thrower), Custom String("{0} {1}", Value In Array(Player Variable(Player Variable(Event Player, thrower), playersCarried), Player Variable(Event Player, i)), Global Variable(stringGraspEscape), Null));
End;
Detach Players(Value In Array(((Event Player).thrower).playerCarried, (Event Player).i));
Set Player Variable(Value In Array(((Event Player).thrower).playerCarried, (Event Player).i), thrower, Null);
Modify Player Variable((Event Player).thrower, playerCarried, Remove From Array By Index, (Event Player).i);
Detach Players(Value In Array(Player Variable(Player Variable(Event Player, thrower), playersCarried), Player Variable(Event Player, i)));
Set Player Variable(Value In Array(Player Variable(Player Variable(Event Player, thrower), playersCarried), Player Variable(Event Player, i)), thrower, Null);
Modify Player Variable(Player Variable(Event Player, thrower), playersCarried, Remove From Array By Index, Player Variable(Event Player, i));
Set Global Variable(willAttackPlayers, Workshop Setting Toggle(Custom String("Bots", Null, Null, Null), Custom String("Attack players (shoot sleep dart, chase, and yeet)", Null, Null, Null), True, 0));
Set Global Variable(willEscape, Workshop Setting Toggle(Custom String("Bots", Null, Null, Null), Custom String("Bots will attempt to escape", Null, Null, Null), True, 0));
Set Global Variable(willJump, Workshop Setting Toggle(Custom String("Bots", Null, Null, Null), Custom String("Bots will jump", Null, Null, Null), True, 0));
Set Global Variable(willRoam, Workshop Setting Toggle(Custom String("Bots", Null, Null, Null), Custom String("Bots will roam around the map", Null, Null, Null), True, 0));
Set Global Variable(willUlt, Workshop Setting Toggle(Custom String("Bots", Null, Null, Null), Custom String("Bots will use ultimate", Null, Null, Null), True, 0));
Start Forcing Dummy Bot Name(Event Player, Random Value In Array(Global Variable(botNames)));
}
}
rule("Spawn AI")
{
event
{
Ongoing - Global;
}
conditions {
Global.spawnAI == True;
Number Of Players(All Teams) < Global.aiNumber;
conditions
{
Global Variable(spawnAI) == True;
Number Of Players(Team(All)) < Global Variable(aiNumber);
}
actions {
// Action count: 4
actions
{
Wait(1, Abort When False);
Create Dummy Bot(Hero(Ana), All Teams, -1, Nearest Walkable Position(Vector(Random Real(-20, 20), 0, Random Real(-20, 20))), Vector(0, 0, 0));
Set Player Variable(Last Created Entity, aimInaccuracy, Vector(Random Real(Multiply(-1, Global.aimInaccuracyExtremes), Global.aimInaccuracyExtremes), 0, Random Real(Multiply(-1, Global.aimInaccuracyExtremes), Global.aimInaccuracyExtremes)));
Set Player Variable(Last Created Entity, aimInaccuracy, Vector(Random Real(Multiply(-1, Global Variable(aimInaccuracyExtremes)), Global Variable(aimInaccuracyExtremes)), Empty Array, Random Real(Multiply(-1, Global Variable(aimInaccuracyExtremes)), Global Variable(aimInaccuracyExtremes))));
Destroy Dummy Bot(All Teams, Slot Of(Random Value In Array(Filtered Array(All Players(All Teams), Is Dummy Bot(Current Array Element)))));
Destroy Dummy Bot(Team(All), Slot Of(Random Value In Array(Filtered Array(All Players(Team(All)), Is Dummy Bot(Current Array Element)))));
Wait(1, Abort When False);
Loop If Condition Is True;
}
}
rule ("Reset Player Target on Spawn") {
event {
rule("Target Roam Subroutine")
{
event
{
Subroutine;
targetRoam;
}
// Action count: 3
actions
{
Set Player Variable(Event Player, targetedPlayer, First Of(Sorted Array(Filtered Array(All Living Players(Team(All)), And(Not(Has Status(Current Array Element, Asleep)), Compare(Event Player, !=, Current Array Element))), Distance Between(Event Player, Current Array Element))));
Start Facing(Event Player, Direction Towards(Event Player, Add(Add(Player Variable(Event Player, targetedPlayer), Multiply(Velocity Of(Player Variable(Event Player, targetedPlayer)), Square Root(Divide(Raise To Power(Distance Between(Event Player, Player Variable(Event Player, targetedPlayer)), 2), Subtract(3600, Raise To Power(Speed Of(Player Variable(Event Player, targetedPlayer)), 2)))))), Player Variable(Event Player, aimInaccuracy))), 800, To World, Direction And Turn Rate);
Set Player Variable(Event Player, aimInaccuracy, Vector(Random Real(Multiply(-1, Global Variable(aimInaccuracyExtremes)), Global Variable(aimInaccuracyExtremes)), 0, Random Real(Multiply(-1, Global Variable(aimInaccuracyExtremes)), Global Variable(aimInaccuracyExtremes))));
}
}
rule("Reset Player Target on Spawn")
{
event
{
Ongoing - Each Player;
All;
All;
}
conditions {
Global.spawnAI == True;
conditions
{
Global Variable(spawnAI) == True;
Is Dummy Bot(Event Player) == True;
Is Alive(Event Player) == True;
Has Spawned(Event Player) == True;
}
actions {
// Action count: 1
actions
{
Call Subroutine(targetRoam);
}
}
rule ("Target Roam Subroutine") {
event {
Subroutine;
targetRoam;
}
actions {
Set Player Variable(Event Player, targetedPlayer, First Of(Sorted Array(Filtered Array(All Living Players(All Teams), And(Not(Has Status(Current Array Element, Asleep)), Compare(Event Player, !=, Current Array Element))), Distance Between(Event Player, Current Array Element))));
Start Facing(Event Player, Direction Towards(Event Player, Add(Add((Event Player).targetedPlayer, Multiply(Velocity Of((Event Player).targetedPlayer), Square Root(Divide(Raise To Power(Distance Between(Event Player, (Event Player).targetedPlayer), 2), Subtract(3600, Raise To Power(Speed Of((Event Player).targetedPlayer), 2)))))), (Event Player).aimInaccuracy)), 600, To World, Direction and Turn Rate);
Set Player Variable(Event Player, aimInaccuracy, Vector(Random Real(Multiply(-1, Global.aimInaccuracyExtremes), Global.aimInaccuracyExtremes), 0, Random Real(Multiply(-1, Global.aimInaccuracyExtremes), Global.aimInaccuracyExtremes)));
}
}
rule("Roam")
{
rule ("Roam") {
event {
event
{
Ongoing - Each Player;
All;
All;
}
conditions {
Global.spawnAI == True;
conditions
{
Global Variable(spawnAI) == True;
Is Dummy Bot(Event Player) == True;
(Event Player).isChasing == False;
Player Variable(Event Player, isChasing) == False;
Has Status(Event Player, Asleep) == False;
}
actions {
If(Compare(Global.willRoam, ==, True));
Start Throttle In Direction(Event Player, Vector(Random Real(-1, 1), 0, Random Real(-1, 1)), 1, To World, Replace existing throttle, Direction and Magnitude);
Else;
// Action count: 12
actions
{
If(Compare(Global Variable(willRoam), ==, True));
Start Throttle In Direction(Event Player, Vector(Random Real(-1, 1), Empty Array, Random Real(-1, 1)), 1, To World, Replace Existing Throttle, Direction And Magnitude);
Has Status((Event Player).targetedPlayer, Asleep) == True;
(Event Player).playerCarried == Empty Array;
Global.willAttackPlayers == True;
Has Status(Player Variable(Event Player, targetedPlayer), Asleep) == True;
Player Variable(Event Player, playersCarried) == Empty Array;
Global Variable(willAttackPlayers) == True;
}
actions {
// Action count: 3
actions
{
Set Player Variable(Event Player, isChasing, True);
Start Throttle In Direction(Event Player, Direction Towards(Event Player, (Event Player).targetedPlayer), 1, To World, Replace existing throttle, Direction and Magnitude);
Start Throttle In Direction(Event Player, Direction Towards(Event Player, Player Variable(Event Player, targetedPlayer)), 1, To World, Replace Existing Throttle, Direction And Magnitude);
Start Throttle In Direction(Event Player, Direction Towards(Event Player, First Of(Sorted Array(Global.positionArray, Distance Between(Event Player, Current Array Element)))), 1, To World, Replace existing throttle, Direction and Magnitude);
Set Player Variable(Event Player, targetedPlayer, First Of(Sorted Array(Global.positionArray, Distance Between(Event Player, Current Array Element))));
Start Throttle In Direction(Event Player, Direction Towards(Event Player, First Of(Sorted Array(Global Variable(positionArray), Distance Between(Event Player, Current Array Element)))), 1, To World, Replace Existing Throttle, Direction And Magnitude);
Set Player Variable(Event Player, targetedPlayer, First Of(Sorted Array(Global Variable(positionArray), Distance Between(Event Player, Current Array Element))));
Wait(3, Ignore Condition);
Loop If Condition Is True;
}
}
rule ("Death Reset") {
event {
Player Died;
rule("Death Reset")
{
event
{
Player died;
All;
All;
}
conditions {
Global.spawnAI == True;
conditions
{
Global Variable(spawnAI) == True;
Is Dummy Bot(Event Player) == True;
}
actions {
// Action count: 3
actions
{
Set Player Variable(Event Player, targetedPlayer, Null);
Set Player Variable(Event Player, isChasing, False);
Stop Forcing Throttle(Event Player);
}
}
rule ("Sleep Reset") {
event {
rule("Sleep Reset")
{
event
{
Ongoing - Each Player;
All;
All;
}
conditions {
Global.spawnAI == True;
conditions
{
Global Variable(spawnAI) == True;
Is Dummy Bot(Event Player) == True;
Has Status(Event Player, Asleep) == True;
}
actions {
// Action count: 4
actions
{
Stop Facing(Event Player);
Set Player Variable(Event Player, targetedPlayer, Null);
Set Player Variable(Event Player, isChasing, False);
Start Throttle In Direction(Event Player, Direction Towards(Event Player, Vector(0, 0, 0)), 1, To World, Replace existing throttle, Direction and Magnitude);
// Action count: 5
actions
{
Start Throttle In Direction(Event Player, Direction Towards(Event Player, Subtract(Left, Left)), 1, To World, Replace Existing Throttle, Direction And Magnitude);
Set Player Variable(Event Player, isChasing, True);
Wait(0.7, Ignore Condition);
Loop If Condition Is True;
Set Player Variable(Event Player, isChasing, False);
}
}
rule ("Stop Chasing After Removing Carried Players") {
event {
rule("Stop Chasing After Removing Carried Players")
{
event
{
Ongoing - Each Player;
All;
All;
}
conditions {
Global.spawnAI == True;
conditions
{
Global Variable(spawnAI) == True;
Is Dummy Bot(Event Player) == True;
(Event Player).playerCarried == Empty Array;
Player Variable(Event Player, playersCarried) == Empty Array;
}
actions {
// Action count: 1
actions
{
Set Player Variable(Event Player, isChasing, False);
}
}
rule ("Stop Staring at Dead Target") {
event {
rule("Stop Staring at Dead Target")
{
event
{
Ongoing - Each Player;
All;
All;
}
conditions {
Global.spawnAI == True;
conditions
{
Global Variable(spawnAI) == True;
Is Dummy Bot(Event Player) == True;
Y Component Of((Event Player).targetedPlayer) <= -1;
Create Effect(If-Then-Else(And(Has Status(Players In Slot(0, All Teams), Asleep), Compare((Players In Slot(0, All Teams)).thrower, ==, Null)), All Players(All Teams), Empty Array), Ring, If-Then-Else(Compare(Players In Slot(0, All Teams), !=, Global.leader), Color(Red), Color(Yellow)), Position Of(Players In Slot(0, All Teams)), Global.pickupRadius, Visible To Position Radius and Color);
Create Effect(If-Then-Else(And(Has Status(Players In Slot(1, All Teams), Asleep), Compare((Players In Slot(1, All Teams)).thrower, ==, Null)), All Players(All Teams), Empty Array), Ring, If-Then-Else(Compare(Players In Slot(1, All Teams), !=, Global.leader), Color(Red), Color(Yellow)), Position Of(Players In Slot(1, All Teams)), Global.pickupRadius, Visible To Position Radius and Color);
Create Effect(If-Then-Else(And(Has Status(Players In Slot(2, All Teams), Asleep), Compare((Players In Slot(2, All Teams)).thrower, ==, Null)), All Players(All Teams), Empty Array), Ring, If-Then-Else(Compare(Players In Slot(2, All Teams), !=, Global.leader), Color(Red), Color(Yellow)), Position Of(Players In Slot(2, All Teams)), Global.pickupRadius, Visible To Position Radius and Color);
Create Effect(If-Then-Else(And(Has Status(Players In Slot(3, All Teams), Asleep), Compare((Players In Slot(3, All Teams)).thrower, ==, Null)), All Players(All Teams), Empty Array), Ring, If-Then-Else(Compare(Players In Slot(3, All Teams), !=, Global.leader), Color(Red), Color(Yellow)), Position Of(Players In Slot(3, All Teams)), Global.pickupRadius, Visible To Position Radius and Color);
Create Effect(If-Then-Else(And(Has Status(Players In Slot(4, All Teams), Asleep), Compare((Players In Slot(4, All Teams)).thrower, ==, Null)), All Players(All Teams), Empty Array), Ring, If-Then-Else(Compare(Players In Slot(4, All Teams), !=, Global.leader), Color(Red), Color(Yellow)), Position Of(Players In Slot(4, All Teams)), Global.pickupRadius, Visible To Position Radius and Color);
Create Effect(If-Then-Else(And(Has Status(Players In Slot(5, All Teams), Asleep), Compare((Players In Slot(5, All Teams)).thrower, ==, Null)), All Players(All Teams), Empty Array), Ring, If-Then-Else(Compare(Players In Slot(5, All Teams), !=, Global.leader), Color(Red), Color(Yellow)), Position Of(Players In Slot(5, All Teams)), Global.pickupRadius, Visible To Position Radius and Color);
Create Effect(If-Then-Else(And(Has Status(Players In Slot(6, All Teams), Asleep), Compare((Players In Slot(6, All Teams)).thrower, ==, Null)), All Players(All Teams), Empty Array), Ring, If-Then-Else(Compare(Players In Slot(6, All Teams), !=, Global.leader), Color(Red), Color(Yellow)), Position Of(Players In Slot(6, All Teams)), Global.pickupRadius, Visible To Position Radius and Color);
Create Effect(If-Then-Else(And(Has Status(Players In Slot(7, All Teams), Asleep), Compare((Players In Slot(7, All Teams)).thrower, ==, Null)), All Players(All Teams), Empty Array), Ring, If-Then-Else(Compare(Players In Slot(7, All Teams), !=, Global.leader), Color(Red), Color(Yellow)), Position Of(Players In Slot(7, All Teams)), Global.pickupRadius, Visible To Position Radius and Color);
Create Effect(If-Then-Else(And(Has Status(Players In Slot(8, All Teams), Asleep), Compare((Players In Slot(8, All Teams)).thrower, ==, Null)), All Players(All Teams), Empty Array), Ring, If-Then-Else(Compare(Players In Slot(8, All Teams), !=, Global.leader), Color(Red), Color(Yellow)), Position Of(Players In Slot(8, All Teams)), Global.pickupRadius, Visible To Position Radius and Color);
Create Effect(If-Then-Else(And(Has Status(Players In Slot(9, All Teams), Asleep), Compare((Players In Slot(9, All Teams)).thrower, ==, Null)), All Players(All Teams), Empty Array), Ring, If-Then-Else(Compare(Players In Slot(9, All Teams), !=, Global.leader), Color(Red), Color(Yellow)), Position Of(Players In Slot(9, All Teams)), Global.pickupRadius, Visible To Position Radius and Color);
Create Effect(If-Then-Else(And(Has Status(Players In Slot(10, All Teams), Asleep), Compare((Players In Slot(10, All Teams)).thrower, ==, Null)), All Players(All Teams), Empty Array), Ring, If-Then-Else(Compare(Players In Slot(10, All Teams), !=, Global.leader), Color(Red), Color(Yellow)), Position Of(Players In Slot(10, All Teams)), Global.pickupRadius, Visible To Position Radius and Color);
Create Effect(If-Then-Else(And(Has Status(Players In Slot(11, All Teams), Asleep), Compare((Players In Slot(11, All Teams)).thrower, ==, Null)), All Players(All Teams), Empty Array), Ring, If-Then-Else(Compare(Players In Slot(11, All Teams), !=, Global.leader), Color(Red), Color(Yellow)), Position Of(Players In Slot(11, All Teams)), Global.pickupRadius, Visible To Position Radius and Color);
Create In-World Text(Filtered Array(All Players(All Teams), And(And(Compare(Global.leader, !=, Null), Compare(Current Array Element, !=, Global.leader)), Is Alive(Global.leader))), Custom String("#1", Null, Null, Null), Global.leader, 2.0, Clip Against Surfaces, Visible To and Position, Custom Color(255, 221, 0, 255), Default Visibility);
Create In-World Text(All Players(All Teams), Global.stringTitle, Vector(0, Add(20, Global.y), 113), 4, Clip Against Surfaces, Visible To String and Color, Custom Color(Global.titleColorR, Global.titleColorG, Global.titleColorB, 255), Default Visibility);
Create In-World Text(All Players(All Teams), Global.stringSubtitle, Vector(0, Add(15, Global.y), 113), 2, Clip Against Surfaces, Visible To and String, Color(White), Default Visibility);
}
}
rule ("Debug Mode Setup") {
event {
Subroutine;
debug;
}
actions {
Create HUD Text(Host Player, Server Load Average, String("Server Load Average", Null, Null, Null), Null, Left, 0, Color(White), Color(White), Color(White), Visible To and String, Default Visibility);
Create HUD Text(Host Player, Position Of(Host Player), Custom String("Host Player Position", Null, Null, Null), Null, Left, 1, Color(White), Color(White), Color(White), Visible To and String, Default Visibility);
Teleport(Event Player, Sorted Array(Randomized Array(Global.spawnPositionArray), Count Of(Players Within Radius(Current Array Element, 10, All Teams, Off))));
Wait(0.016, Ignore Condition);
Set Facing(Event Player, Direction Towards(Event Player, Vector(0, Add(Global.y, Subtract(Eye Position(Event Player), Position Of(Event Player))), 0)), To World);
Set Player Variable(Event Player, ready, True);
}
}
rule ("Chase Color") {
event {
Ongoing - Global;
}
actions {
Chase Global Variable At Rate(titleColorB, 255, 300, Destination and Rate);