Return to post
- variables
- {
- global:
- 0: GatePosition
- 1: ZenSpawnPositions
- 2: SpawnPositionMaxId
- 3: LoopIterator1
- 4: BigBossSpawnPositions
- 5: PlayerSpawnPositions
- 6: GateHealthChase
- 7: GateHealth
- 8: GateMaxHealth
- 9: GateProgressBarColorCurrent
- 10: GateProgressBarColorComponent
- 11: GateHealthEvent
- 12: BigBossTargetPositions
- 13: SniperPositions
- 14: BallSpawnPositions
- 15: ZenRespawnTime
- 16: TimeMin
- 17: TimeSec
- 18: CurrentBot
- 19: BotsArrayOrder
- 20: BotsArrayOrderCurrentId
- 21: IsDebug
- 22: BotOrisaParent
- 23: SpecialBots
- 24: BotOrisaChild
- 25: GateRepairPosition
- 26: BotOrisaTargetPosition
- 27: BotEchoRespawnPosition
- 28: BotEchoTeleportPositions
- 29: UpgradeGateMaxHealthValue
- 30: UpgradeGateMaxHealthHudId
- 31: UpgradePlayerMaxHealthValue
- 32: UpgradePlayerMaxHealthHudId
- 33: UpgradeCriticalDamageValue
- 34: UpgradeCriticalDamageHudId
- 35: UpgradeMaxAmmoValue
- 36: UpgradeMaxAmmoHudId
- 37: UpgradeMaxAmmoMaxValue
- 38: UpgradePlayerMaxHealthMaxValue
- 39: UpgradeCriticalDamageMaxValue
- 40: UpgradeGateMaxHealthMaxValue
- 41: UpgradePlayerMaxHealthNewValue
- 125: NodePositions
- 126: NodeConnections
- 127: DistanceMatrix
- player:
- 0: BotSeePlayer
- 1: BotDoesUniqueBehaviour
- 2: BotEffects
- 3: BotRayCastHitPosition
- 4: BotEventPosition
- 5: CurrentHero
- 6: IsDead
- 7: IsRespawning
- 8: BotBastionArtilleryDidShotsCount
- 9: BotCounter
- 10: HasBadStatus
- 11: EventHealth
- 12: HealOverTimeId
- 13: BotIsOrisaChild
- 14: BotEchoCapturedPlayer
- 118: BotLoopIterator2
- 119: BotLoopIterator1
- 120: BotTempArray
- 121: BotTargetPlayer
- 122: BotTargetPosition
- 123: BotTargetNodeId
- 124: BotPathCurrentNodeId
- 125: BotCurrentDistance
- 126: BotShortestDistance
- 127: BotIsPathFinding
- }
- subroutines
- {
- 0: BotStartPathFinding
- 1: BotBastionArtilleryDamage
- 2: BotBastionFlameGunDamage
- 3: BotBastionRespawn
- 4: GateProgressBarColor
- 5: BotZenyattaRespawn
- 6: BotWidowRespawn
- 7: BotBallRespawn
- 8: BotGetCurrentNodeId
- 9: BotGetTargetNodeId
- 10: AddNextHeroInGame
- 11: BotOrisaRespawn
- 12: BotLandingFromSky
- 13: BotEchoRespawn
- 14: BotEchoDetachPlayer
- 15: BotEchoFlyToPlayer
- 16: BotEchoFlyToPortal
- 126: BotGetNextNodeId
- 127: BotResetPathFinding
- }
disabled rule("GLOBAL: DEBUG - CREATE BOTS")
{
event
{
Ongoing - Each Player;
Team 1;
All;
}
conditions
{
Has Spawned(Event Player) == True;
Is Dummy Bot(Event Player) == False;
Is Button Held(Event Player, Button(Interact)) == True;
}
actions
{
Create Dummy Bot(Hero(Echo), Team 2, -1, Objective Position(2), Vector(0, 0, 0));
disabled Create Dummy Bot(Hero(Widowmaker), Team 2, -1, Objective Position(2), Vector(0, 0, 0));
disabled Create Dummy Bot(Hero(Bastion), Team 2, -1, Objective Position(2), Vector(0, 0, 0));
disabled Create Dummy Bot(Hero(Bastion), Team 2, -1, Objective Position(2), Vector(0, 0, 0));
disabled Create Dummy Bot(Hero(Wrecking Ball), Team 2, -1, Objective Position(2), Vector(0, 0, 0));
disabled Create Dummy Bot(Hero(Wrecking Ball), Team 2, -1, Objective Position(2), Vector(0, 0, 0));
}
}
- disabled rule("PLAYER: DEBUG - PRESS INTERACT")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
- Host Player == True;
- Is Button Held(Event Player, Button(Interact)) == True;
- }
- actions
- {
- disabled Modify Player Score(Event Player, 10);
- disabled Global.GateHealth -= 5;
- disabled Start Rule(GateProgressBarColor, Restart Rule);
- Global.TimeSec = 59;
- Set Status(Event Player, Null, Phased Out, 9999);
- disabled Set Ultimate Charge(Event Player, 100);
- disabled Kill(Event Player, Null);
- }
- }
- rule("GLOBAL: GAME - INIT")
- {
- event
- {
- Ongoing - Global;
- }
- actions
- {
Create HUD Text(All Players(All Teams), Null, Null, Custom String("DEFEND CASTLE V{0} BY HUKUTA94#2589", 0.300), Right, -1000,
- Create HUD Text(All Players(All Teams), Null, Null, Custom String("DEFEND CASTLE V{0} BY HUKUTA94#2589", 0.400), Right, -1000,
- Color(White), Color(White), Color(White), Visible To, Default Visibility);
- Disable Built-In Game Mode Completion;
- Global.IsDebug = Workshop Setting Toggle(Custom String("DEVELOPMENT"), Custom String("DEBUG"), False, 0);
- Global.GateRepairPosition = Vector(153, 8, -46.500);
- Global.GatePosition = Vector(148.800, 6, -46.400);
- Global.BallSpawnPositions = Array(Vector(104, 7, -46), Vector(106, 2, -31));
- Global.SniperPositions = Array(Vector(154, 18, -22.600), Vector(86, 12, -46.600), Vector(80.880, 11.300, -71.600), Vector(98, 9,
- -19));
- Global.ZenSpawnPositions = Array(Vector(79.500, 5, -100), Vector(90, 4, -88), Vector(65, 11, -70), Vector(85, 4, -68), Vector(96,
- 2, -73), Vector(84, 7, -47), Vector(95, 9, -34), Vector(108, 1.700, -28), Vector(113, 7, -37), Vector(123, 5, -19), Vector(144,
- 5, -19), Vector(123, 6, -39), Vector(123, 6, -61), Vector(129, 6, -30.500), Vector(135, 6, -63));
- Global.PlayerSpawnPositions = Array(Vector(153.300, 10, -63.800), Vector(153.300, 10, -61.700), Vector(153.300, 10, -31.700),
- Vector(153.300, 10, -29.600));
- Global.BigBossSpawnPositions = Array(Vector(78, 4, -84), Vector(95, 4, -82));
- Global.BigBossTargetPositions = Array(Vector(131, 12, -62), Vector(115, 7, -46), Global.GatePosition, Vector(140, 10, -27));
- Global.SpecialBots = Array(Hero(Wrecking Ball), Hero(Bastion), Hero(Widowmaker));
- Global.GateMaxHealth = Workshop Setting Integer(Custom String("GATE"), Custom String("MAX HEALTH"), 500, 100, 1000, 0);
- Global.SpawnPositionMaxId = 6;
- Global.BotsArrayOrder = Array(Hero(Zenyatta), Hero(Widowmaker), Hero(Wrecking Ball), Null, Hero(Bastion), Hero(Echo), Hero(Orisa),
- Hero(Bastion));
- Global.ZenRespawnTime = 10;
- Global.BotOrisaTargetPosition = Vector(104, 7, -46);
Create In-World Text(All Players(Team 1), Custom String(" {0}\r\nREPAIR", Hero Icon String(Hero(Torbjorn))),
Global.GatePosition + Vector(0, 1.400, 0), 1.200, Clip Against Surfaces, Visible To, Color(White), Default Visibility);
- Global.BotEchoRespawnPosition = Vector(130, 23, -44);
- Global.BotEchoTeleportPositions = Array(Vector(88, 23, -79), Vector(108, 18, -27));
- }
- }
- rule("GLOBAL: TEAM UPGRADES - INIT")
- {
- event
- {
- Ongoing - Global;
- }
- actions
- {
- Global.UpgradeMaxAmmoMaxValue = 200;
- Global.UpgradeCriticalDamageMaxValue = 20;
- Global.UpgradePlayerMaxHealthNewValue = 150;
- Global.UpgradePlayerMaxHealthMaxValue = 6000;
- Global.UpgradeGateMaxHealthMaxValue = Round To Integer(Global.GateMaxHealth + Global.GateMaxHealth * 0.500, Up);
- Abort If(Global.IsDebug == False);
- Global.UpgradeMaxAmmoMaxValue = 1;
- Global.UpgradeCriticalDamageMaxValue = 1;
- Global.UpgradePlayerMaxHealthMaxValue = 1;
- Global.UpgradeGateMaxHealthMaxValue = 1;
- }
- }
- disabled rule("GLOBAL: DEBUG - CREATE BOTS")
- {
- event
- {
- Ongoing - Global;
- }
- conditions
- {
- Is In Setup == True;
- }
- actions
- {
- Create Dummy Bot(Hero(Wrecking Ball), Team 1, -1, Global.GatePosition, Vector(0, 0, 0));
- disabled Create Dummy Bot(Hero(Widowmaker), Team 2, -1, Objective Position(2), Vector(0, 0, 0));
- disabled Create Dummy Bot(Hero(Bastion), Team 2, -1, Objective Position(2), Vector(0, 0, 0));
- disabled Create Dummy Bot(Hero(Bastion), Team 2, -1, Objective Position(2), Vector(0, 0, 0));
- disabled Create Dummy Bot(Hero(Wrecking Ball), Team 2, -1, Objective Position(2), Vector(0, 0, 0));
- disabled Create Dummy Bot(Hero(Wrecking Ball), Team 2, -1, Objective Position(2), Vector(0, 0, 0));
- }
- }
- disabled rule("PLAYER: DEBUG")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
- disabled Host Player == True;
- Has Spawned(Event Player) == True;
- disabled Is Dummy Bot(Event Player) == False;
- }
- actions
- {
- Create HUD Text(Event Player, Custom String("POS {0}\r\nFACING {1}", Position Of(Event Player), Facing Direction Of(Event Player)),
- Null, Null, Left, -99, Color(White), Color(White), Color(White), Visible To and String, Default Visibility);
- Create HUD Text(Event Player, Custom String("SERVER PERFORMANCE\r\nLOAD {0}%\r\nPEAK {1}%\r\nAVG {2}%", Server Load,
- Server Load Peak, Server Load Average), Null, Null, Left, -99, Color(White), Color(White), Color(White), Visible To and String,
- Default Visibility);
- disabled Create Progress Bar HUD Text(Event Player, 45, Custom String("45 / 100 KILLS"), Left, -99, Color(Blue), Color(White),
- Visible To Values and Color, Default Visibility);
- disabled Create HUD Text(Event Player, Custom String("{0}", Hero Icon String(Hero Of(Event Player))), Null, Custom String(
- "LEVEL 1 - 50 AMMO CLIP"), Left, -99, Color(White), Color(White), Color(White), Visible To and String, Default Visibility);
- "ЭФФЕКТ С ОФФСЕТОМ ОТ ПОЗИЦИИ ГЛАЗ"
- disabled Create Beam Effect(All Players(All Teams), Bad Beam, Eye Position(Event Player) - Vector(0, 0.700, 0) + Facing Direction Of(
- Event Player) * 3, Eye Position(Event Player) + Facing Direction Of(Event Player) * 50, Color(Purple),
- Visible To Position and Radius);
- }
- }
- disabled rule("=== GAME PHASES ===")
- {
- event
- {
- Ongoing - Global;
- }
- }
- rule("GLOBAL: ASEMBLING PHASE")
- {
- event
- {
- Ongoing - Global;
- }
- conditions
- {
- Is Assembling Heroes == True;
- }
- actions
- {
- If(Global.IsDebug);
- Set Match Time(1);
- Else;
- Disable Inspector Recording;
- Set Match Time(20);
- End;
- Disable Game Mode HUD(All Players(All Teams));
- Disable Game Mode In-World UI(All Players(All Teams));
- }
- }
- rule("GLOBAL: SETUP PHASE - MAKE GUI")
- {
- event
- {
- Ongoing - Global;
- }
- conditions
- {
- Is In Setup == True;
- }
- actions
- {
- If(Global.IsDebug);
- Set Match Time(1);
- Else;
- Set Match Time(20);
- End;
- Set Objective Description(All Players(All Teams), Custom String("DEFEND GATE"), Visible To and String);
- Create In-World Text(All Players(Team 1), Custom String(" {0}\r\nREPAIR\r\n {1}", Hero Icon String(Hero(Torbjörn)),
- Ability Icon String(Hero(Bastion), Button(Secondary Fire))), Global.GatePosition + Vector(0, 1.400, 0), 1.200, Do Not Clip,
- Visible To, Color(White), Default Visibility);
- Create HUD Text(All Players(Team 1), Null, Null, Custom String("TEAM CHALLENGES"), Left, 0, Color(White), Color(Blue), Color(
- White), Visible To, Default Visibility);
- "UPGRADE - GATE'S MAX HEALTH"
- Create HUD Text(All Players(Team 1), Ability Icon String(Hero(Reinhardt), Button(Secondary Fire)), Custom String(
- "GATE'S MAX HEALTH: {0} HP", Round To Integer(Global.GateMaxHealth + Global.GateMaxHealth * 0.500, Up)), Custom String(
- "REPAIR GATE {0}/{1} HP", Global.UpgradeGateMaxHealthValue, Global.UpgradeGateMaxHealthMaxValue), Left, 1, Color(Orange),
- Color(White), Color(White), Visible To and String, Default Visibility);
- Global.UpgradeGateMaxHealthHudId = Last Text ID;
- Create HUD Text(All Players(Team 1), Null, Custom String(" \r\n "), Null, Left, 2, Color(White), Color(White), Color(White),
- Visible To, Default Visibility);
- "UPGRADE - PLAYER'S MAX HEALTH"
- Create HUD Text(All Players(Team 1), Icon String(Plus), Custom String("PLAYER'S MAX HEALTH {0}%",
- Global.UpgradePlayerMaxHealthNewValue), Custom String("HEAL PLAYERS {0}/{1} HP", Round To Integer(
- Global.UpgradePlayerMaxHealthValue, Down), Global.UpgradePlayerMaxHealthMaxValue), Left, 3, Color(Orange), Color(White), Color(
- White), Visible To and String, Default Visibility);
- Global.UpgradePlayerMaxHealthHudId = Last Text ID;
- Create HUD Text(All Players(Team 1), Null, Custom String(" \r\n "), Null, Left, 4, Color(White), Color(White), Color(White),
- Visible To, Default Visibility);
- "UPGRADE - CRITICAL DAMAGE"
- Create HUD Text(All Players(Team 1), Icon String(Skull), Custom String("CRITICAL DAMAGE 150%"), Custom String(
- "KILL WIDOW WITH HEADSHOT: {0}/{1}", Global.UpgradeCriticalDamageValue, Global.UpgradeCriticalDamageMaxValue), Left, 5, Color(
- Orange), Color(White), Color(White), Visible To and String, Default Visibility);
- Global.UpgradeCriticalDamageHudId = Last Text ID;
- Create HUD Text(All Players(Team 1), Null, Custom String(" \r\n "), Null, Left, 6, Color(White), Color(White), Color(White),
- Visible To, Default Visibility);
- "UPGRADE - MAX AMMO"
- Create HUD Text(All Players(Team 1), Icon String(Asterisk), Custom String("MAX AMMO 200%"), Custom String("KILL {2}: {0}/{1}",
- Global.UpgradeMaxAmmoValue, Global.UpgradeMaxAmmoMaxValue, Hero(Zenyatta)), Left, 7, Color(Orange), Color(White), Color(White),
- Visible To and String, Default Visibility);
- Global.UpgradeMaxAmmoHudId = Last Text ID;
- }
- }
- rule("GLOBAL: GAME IN PROGRESS")
- {
- event
- {
- Ongoing - Global;
- }
- conditions
- {
- Is Game In Progress == True;
- }
- actions
- {
- Set Match Time(3599);
- Disable Built-In Game Mode Scoring;
- Disable Built-In Game Mode Announcer;
- Disable Built-In Game Mode Completion;
- Disable Game Mode HUD(All Players(All Teams));
- Global.GateHealth = Global.GateMaxHealth;
- Global.GateHealthChase = Global.GateHealth;
- Global.GateProgressBarColorComponent = 255;
- Global.GateProgressBarColorCurrent = Color(White);
- Create Progress Bar HUD Text(All Players(Team 1), Global.GateHealthChase * 100 / Global.GateMaxHealth, Custom String(
- "GATE {0}/{1}", Global.GateHealth, Global.GateMaxHealth), Top, 1, Global.GateProgressBarColorCurrent, Color(White),
- Visible To Values and Color, Default Visibility);
- Create HUD Text(All Players(Team 1), Null, Null, Custom String("SURVIVED TIME: {0}:{1}", Global.TimeMin,
- Global.TimeSec < 10 ? Custom String("0{0}", Global.TimeSec) : Global.TimeSec), Top, 2, Color(White), Color(White), Color(
- White), Visible To and String, Default Visibility);
- "CREATE BOTS"
- For Global Variable(LoopIterator1, 0, 8, 1);
- Create Dummy Bot(Global.BotsArrayOrder[Global.BotsArrayOrderCurrentId], Team 2, -1, Vector(0, 999, 0), Vector(0, 0, 0));
- Wait(0.600, Ignore Condition);
- End;
- }
- }
- disabled rule("=== GAME - MAIN LOGIC ===")
- {
- event
- {
- Ongoing - Global;
- }
- }
- rule("GLOBAL: DEFEAT")
- {
- event
- {
- Ongoing - Global;
- }
- conditions
- {
- Is Game In Progress == True;
- Global.IsDebug == False;
- Global.GateHealth <= 0;
- }
- actions
- {
- Declare Team Victory(Team 2);
- }
- }
- rule("GLOBAL: TIMER")
- {
- event
- {
- Ongoing - Global;
- }
- conditions
- {
- Is Game In Progress == True;
- disabled Global.GateHealth > 0;
- }
- actions
- {
- Wait(1, Ignore Condition);
- Global.TimeSec += 1;
- If(Global.TimeSec == 60);
- Global.TimeSec = 0;
- Global.TimeMin += 1;
- Global.SpawnPositionMaxId += 1;
- Start Rule(AddNextHeroInGame, Restart Rule);
- Else If(Global.TimeSec == 30);
- Global.SpawnPositionMaxId += 1;
- End;
- Loop If Condition Is True;
- }
- }
- rule("SUBROUTINE: GAME LOGIC")
- {
- event
- {
- Subroutine;
- AddNextHeroInGame;
- }
- actions
- {
- "REDUCE RESPAWN TIME FOR ZENS"
- Global.ZenRespawnTime -= 1.500;
- Global.ZenRespawnTime = Max(1, Global.ZenRespawnTime);
- Set Respawn Max Time(Filtered Array(All Players(Team 2), Hero Of(Current Array Element) == Global.BotsArrayOrder[0]),
- Global.ZenRespawnTime);
- "ALL HEROES WAS ADDED IN GAME"
- Abort If(Global.BotsArrayOrderCurrentId == Count Of(Global.BotsArrayOrder) - 1);
- Global.BotsArrayOrderCurrentId += 1;
- "ABORT IF NEXT HERO IN ARRAY ORDER IS NULL"
- Abort If(Global.BotsArrayOrder[Global.BotsArrayOrderCurrentId] == Null);
- "WAITING FOR ANY DEAD BOT"
- Wait Until(Is True For Any(All Players(Team 2), Is Dead(Current Array Element) && Hero Of(Current Array Element)
- == Global.BotsArrayOrder[0]), 99999);
- "REPLACE HIM TO A NEW HERO"
- Global.CurrentBot = Filtered Array(All Players(Team 2), Is Dead(Current Array Element) && Hero Of(Current Array Element)
- == Global.BotsArrayOrder[0])[0];
- Destroy Dummy Bot(Team 2, Slot Of(Global.CurrentBot));
- Wait(0.050, Ignore Condition);
- Create Dummy Bot(Global.BotsArrayOrder[Global.BotsArrayOrderCurrentId], Team 2, -1, Vector(0, 999, 0), Vector(0, 0, 0));
- }
- }
- disabled rule("=== TEAM UPGRADES ===")
- {
- event
- {
- Ongoing - Global;
- }
- }
- rule("GLOBAL: UPGRADE - GATE'S MAX HEALTH - DONE")
- {
- event
- {
- Ongoing - Global;
- }
- conditions
- {
- Is Game In Progress == True;
- Global.UpgradeGateMaxHealthValue >= Global.UpgradeGateMaxHealthMaxValue;
- }
- actions
- {
- Big Message(All Players(Team 1), Custom String("GATE'S MAX HEALTH UNLOCKED!"));
- Play Effect(All Players(All Teams), Good Explosion, Color(Green), Global.GatePosition, 5);
- Play Effect(All Players(All Teams), Buff Impact Sound, Color(Green), Global.GatePosition, 100);
- Destroy HUD Text(Global.UpgradeGateMaxHealthHudId);
- Create HUD Text(All Players(Team 1), Ability Icon String(Hero(Reinhardt), Button(Secondary Fire)), Custom String("{0}",
- Icon String(Checkmark)), Custom String("GATE'S MAX HEALTH: {0} HP", Global.UpgradeGateMaxHealthMaxValue), Left, 1, Color(
- Green), Color(Green), Color(Green), Visible To, Default Visibility);
- Global.UpgradeGateMaxHealthHudId = Last Text ID;
- Global.GateMaxHealth = Global.UpgradeGateMaxHealthMaxValue;
- Global.GateHealth = Global.GateMaxHealth;
- Start Rule(GateProgressBarColor, Restart Rule);
- }
- }
- rule("PLAYER: UPGRADE - PLAYER'S MAX HEALTH - DEALT HEALING")
- {
- event
- {
- Player Received Healing;
- All;
- All;
- }
- conditions
- {
- Is Game In Progress == True;
- Healer != Event Player;
- Global.UpgradePlayerMaxHealthValue < Global.UpgradePlayerMaxHealthMaxValue;
- }
- actions
- {
- Global.UpgradePlayerMaxHealthValue += Event Healing;
- }
- }
- rule("GLOBAL: UPGRADE - PLAYER'S MAX HEALTH - DONE")
- {
- event
- {
- Ongoing - Global;
- }
- conditions
- {
- Is Game In Progress == True;
- Global.UpgradePlayerMaxHealthValue >= Global.UpgradePlayerMaxHealthMaxValue;
- }
- actions
- {
- Big Message(All Players(Team 1), Custom String("PLAYER'S MAX HEALTH UNLOCKED!"));
- Destroy HUD Text(Global.UpgradePlayerMaxHealthHudId);
- Create HUD Text(All Players(Team 1), Icon String(Plus), Custom String("{0}", Icon String(Checkmark)), Custom String(
- "PLAYER'S MAX HEALTH: {0}%", Global.UpgradePlayerMaxHealthNewValue), Left, 3, Color(Green), Color(Green), Color(Green),
- Visible To, Default Visibility);
- Global.UpgradePlayerMaxHealthHudId = Last Text ID;
- Set Max Health(All Players(Team 1), Global.UpgradePlayerMaxHealthNewValue);
- Heal(All Players(Team 1), Null, 9999);
- For Global Variable(LoopIterator1, 0, Count Of(All Players(Team 1)), 1);
- Play Effect(All Players(All Teams), Good Pickup Effect, Color(Yellow), Position Of(All Players(Team 1)[Global.LoopIterator1]), 1);
- Play Effect(All Players(All Teams), Buff Impact Sound, Color(Yellow), Position Of(All Players(Team 1)[Global.LoopIterator1]), 100);
- End;
- }
- }
- rule("PLAYER: UPGRADE - CRITICAL DAMAGE - DEALT KILL")
- {
- event
- {
- Player Dealt Final Blow;
- Team 1;
- All;
- }
- conditions
- {
- Is Game In Progress == True;
- Event Was Critical Hit == True;
- Hero Of(Victim) == Hero(Widowmaker);
- Global.UpgradeCriticalDamageValue < Global.UpgradeCriticalDamageMaxValue;
- }
- actions
- {
- Global.UpgradeCriticalDamageValue += 1;
- Small Message(All Players(Team 1), Custom String("CRITICAL DAMAGE CHALANGE +1"));
- }
- }
- rule("GLOBAL: UPGRADE - CRITICAL DAMAGE - DONE")
- {
- event
- {
- Ongoing - Global;
- }
- conditions
- {
- Is Game In Progress == True;
- Global.UpgradeCriticalDamageValue >= Global.UpgradeCriticalDamageMaxValue;
- }
- actions
- {
- Big Message(All Players(Team 1), Custom String("CRITICAL DAMAGE 150% UNLOCKED!"));
- Destroy HUD Text(Global.UpgradeCriticalDamageHudId);
- Create HUD Text(All Players(Team 1), Icon String(Skull), Custom String("{0}", Icon String(Checkmark)), Custom String(
- "CRITICAL DAMAGE 150%"), Left, 5, Color(Green), Color(Green), Color(Green), Visible To, Default Visibility);
- Global.UpgradeCriticalDamageHudId = Last Text ID;
- }
- }
- rule("PLAYER: UPGRADE - CRITICAL DAMAGE - UNLOCKED")
- {
- event
- {
- Player Dealt Damage;
- Team 1;
- All;
- }
- conditions
- {
- Is Game In Progress == True;
- Event Was Critical Hit == True;
- Global.UpgradeCriticalDamageValue >= Global.UpgradeCriticalDamageMaxValue;
- }
- actions
- {
- Damage(Victim, Event Player, Event Damage * 0.500);
- }
- }
- rule("PLAYER: UPGRADE - MAX AMMO - DEALT KILL")
- {
- event
- {
- Player Dealt Final Blow;
- Team 1;
- All;
- }
- conditions
- {
- Is Game In Progress == True;
- Hero Of(Victim) == Hero(Zenyatta);
- Global.UpgradeMaxAmmoValue < Global.UpgradeMaxAmmoMaxValue;
- }
- actions
- {
- Global.UpgradeMaxAmmoValue += 1;
- }
- }
- rule("GLOBAL: UPGRADE - MAX AMMO - DONE")
- {
- event
- {
- Ongoing - Global;
- }
- conditions
- {
- Is Game In Progress == True;
- Global.UpgradeMaxAmmoValue >= Global.UpgradeMaxAmmoMaxValue;
- }
- actions
- {
- Big Message(All Players(Team 1), Custom String("MAX AMMO 200% UNLOCKED!"));
- Destroy HUD Text(Global.UpgradeMaxAmmoHudId);
- Create HUD Text(All Players(Team 1), Icon String(Asterisk), Custom String("{0}", Icon String(Checkmark)), Custom String(
- "MAX AMMO 200%"), Left, 7, Color(Green), Color(Green), Color(Green), Visible To, Default Visibility);
- Global.UpgradeMaxAmmoHudId = Last Text ID;
- For Global Variable(LoopIterator1, 0, Count Of(All Players(Team 1)), 1);
- Set Max Ammo(All Players(Team 1)[Global.LoopIterator1], 0, Max Ammo(All Players(Team 1)[Global.LoopIterator1], 0) * 2);
- Set Max Ammo(All Players(Team 1)[Global.LoopIterator1], 1, Max Ammo(All Players(Team 1)[Global.LoopIterator1], 1) * 2);
- Set Ammo(All Players(Team 1)[Global.LoopIterator1], 0, Max Ammo(All Players(Team 1)[Global.LoopIterator1], 0));
- Set Ammo(All Players(Team 1)[Global.LoopIterator1], 1, Max Ammo(All Players(Team 1)[Global.LoopIterator1], 1));
- End;
- }
- }
- disabled rule("=== GATE ===")
- {
- event
- {
- Ongoing - Global;
- }
- }
- rule("TORB: GATE REPAIR")
- {
- event
- {
- Ongoing - Each Player;
- Team 1;
Torbjorn;
- Torbjörn;
- }
- conditions
- {
- Has Spawned(Event Player) == True;
- Weapon(Event Player) == 2;
- Is Firing Primary(Event Player) == True;
- Global.GateHealth < Global.GateMaxHealth;
- Is In View Angle(Event Player, Global.GateRepairPosition, 80) == True;
- Distance Between(Position Of(Event Player), Global.GatePosition) < 3.500;
- }
- actions
- {
- Small Message(Event Player, Custom String("REPAIR +2% ULTIMATE"));
- "UPGRADE - GATE'S MAX HEALTH"
- If(Global.UpgradeGateMaxHealthValue < Global.UpgradeGateMaxHealthMaxValue);
- Global.UpgradeGateMaxHealthValue += 5;
- End;
- "HEAL GATE"
- Global.GateHealth += 5;
- If(Global.GateHealth > Global.GateMaxHealth);
- Global.GateHealth = Global.GateMaxHealth;
- "CHARGE ULTIMATE"
- Else;
- Set Ultimate Charge(Event Player, Ultimate Charge Percent(Event Player) + 2);
- End;
- Start Rule(GateProgressBarColor, Restart Rule);
- Wait(Is Using Ability 2(Event Player) == True ? 0.350 : 0.700, Ignore Condition);
- Loop If Condition Is True;
- }
- }
- rule("SUBROUTINE: GATE PROGRESS BAR COLOR")
- {
- event
- {
- Subroutine;
- GateProgressBarColor;
- }
- actions
- {
- Stop Chasing Global Variable(GateHealthChase);
- Chase Global Variable Over Time(GateHealthChase, Global.GateHealth, 0.100, Destination and Duration);
- "GATE WAS DAMAGED"
- If(Global.GateHealth < Global.GateHealthEvent);
- For Global Variable(LoopIterator1, 0, 3, 1);
- Global.GateProgressBarColorCurrent = Color(Red);
- Wait(0.030, Ignore Condition);
- Global.GateProgressBarColorCurrent = Color(White);
- Wait(0.030, Ignore Condition);
- End;
- "GATE WAS REPAIRED"
- Else;
- Global.GateProgressBarColorCurrent = Color(Green);
- Wait(0.030, Ignore Condition);
- Global.GateProgressBarColorCurrent = Color(Yellow);
- Wait(0.030, Ignore Condition);
- End;
- Global.GateHealthEvent = Global.GateHealth;
- Global.GateProgressBarColorComponent = Global.GateHealth * 255 / Global.GateMaxHealth;
- Global.GateProgressBarColorCurrent = Custom Color(255, Global.GateProgressBarColorComponent, Global.GateProgressBarColorComponent,
- 255);
- }
- }
- disabled rule("=== COMMON MECHANICS ===")
- {
- event
- {
- Ongoing - Global;
- }
- }
- rule("ALL: INIT")
- {
- event
- {
- Player Joined Match;
- All;
- All;
- }
- actions
- {
- "ALL INIT"
- Event Player.IsDead = True;
- Disable Kill Feed(Event Player);
- Disable Game Mode In-World UI(Event Player);
- If(Is Game In Progress);
- Disable Game Mode HUD(Event Player);
- End;
- "TEAM UPGRADE - PLAYER'S MAX HEALTH"
- If(!Is Dummy Bot(Event Player) && Global.UpgradePlayerMaxHealthValue >= Global.UpgradePlayerMaxHealthMaxValue && Max Health(
- Event Player) != Global.UpgradePlayerMaxHealthNewValue);
- Set Max Health(Event Player, Global.UpgradePlayerMaxHealthNewValue);
- End;
- "BOT INIT"
- Abort If(!Is Dummy Bot(Event Player));
- Event Player.BotEventPosition = Vector(0, 999, 0);
- Call Subroutine(BotResetPathFinding);
- }
- }
- rule("ALL: DEATH")
- {
- event
- {
- Player Died;
- All;
- All;
- }
- actions
- {
- "COMMON LOGIC"
- Event Player.IsDead = True;
- Event Player.HasBadStatus = False;
- "BOT'S LOGIC"
- Abort If(!Is Dummy Bot(Event Player));
- Disable Nameplates(Event Player, All Players(Team 1));
- Stop Holding Button(Event Player, Button(Ability 1));
- Stop Holding Button(Event Player, Button(Primary Fire));
- Stop Holding Button(Event Player, Button(Secondary Fire));
- Call Subroutine(BotResetPathFinding);
- Event Player.BotDoesUniqueBehaviour = False;
- "DESTROY ALL CREATED BY BOT EFFECTS"
- Destroy Effect(Event Player.BotEffects);
- For Player Variable(Event Player, BotLoopIterator1, 0, Count Of(Event Player.BotEffects), 1);
- Destroy Effect(Event Player.BotEffects[Event Player.BotLoopIterator1]);
- End;
- If(Hero Of(Event Player) == Hero(Orisa));
- Kill(Global.BotOrisaChild, Null);
- Detach Players(Global.BotOrisaChild);
- Clear Status(Global.BotOrisaChild, Phased Out);
- Set Damage Dealt(Global.BotOrisaChild, 100);
- Global.BotOrisaChild.BotIsOrisaChild = False;
- Global.BotOrisaChild = Null;
- Else If(Hero Of(Event Player) == Hero(Echo));
- Set Gravity(Event Player, 100);
- Call Subroutine(BotEchoDetachPlayer);
- End;
- Event Player.BotSeePlayer = Null;
- }
- }
- rule("ALL: RESPAWN")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
- Has Spawned(Event Player) == True;
- Is Alive(Event Player) == True;
- (Hero Of(Event Player) != Event Player.CurrentHero || Event Player.IsDead == True) == True;
- }
- actions
- {
Event Player.CurrentHero = Hero Of(Event Player);
- Event Player.IsDead = False;
- "TEAM UPGRADE - MAX AMMO"
- If(!Is Dummy Bot(Event Player) && Hero Of(Event Player)
- != Event Player.CurrentHero && Global.UpgradeMaxAmmoValue >= Global.UpgradeMaxAmmoMaxValue);
- Set Max Ammo(Event Player, 0, Ammo(Event Player, 0) * 2);
- Set Max Ammo(Event Player, 1, Ammo(Event Player, 1) * 2);
- Set Ammo(Event Player, 0, Max Ammo(Event Player, 0));
- Set Ammo(Event Player, 1, Max Ammo(Event Player, 1));
- End;
- Event Player.CurrentHero = Hero Of(Event Player);
- "PLAYER RESPAWN"
- If(!Is Dummy Bot(Event Player));
- Set Status(Event Player, Null, Phased Out, 3);
- Set Facing(Event Player, Vector(-1, 0, 0), To World);
- Teleport(Event Player, Global.PlayerSpawnPositions[Slot Of(Event Player)]);
- Abort;
- End;
- "BOT RESPAWN"
- Abort If(!Is Game In Progress);
- Enable Nameplates(Event Player, All Players(Team 1));
- Event Player.IsRespawning = True;
- Call Subroutine(BotResetPathFinding);
- If(Hero Of(Event Player) == Hero(Bastion));
- Call Subroutine(BotBastionRespawn);
- Else If(Hero Of(Event Player) == Hero(Zenyatta));
- Call Subroutine(BotZenyattaRespawn);
- Else If(Hero Of(Event Player) == Hero(Widowmaker));
- Call Subroutine(BotWidowRespawn);
- Else If(Hero Of(Event Player) == Hero(Wrecking Ball));
- Call Subroutine(BotBallRespawn);
- Else If(Hero Of(Event Player) == Hero(Orisa));
- Call Subroutine(BotOrisaRespawn);
- Else If(Hero Of(Event Player) == Hero(Echo));
- Call Subroutine(BotEchoRespawn);
- End;
- Event Player.IsRespawning = False;
- Heal(Event Player, Null, 100000);
- }
- }
- disabled rule("=== BOT COMMON MECHANICS ===")
- {
- event
- {
- Ongoing - Global;
- }
- }
- rule("SUBROUTINE: BOT - LANDING FROM SKY")
- {
- event
- {
- Subroutine;
- BotLandingFromSky;
- }
- actions
- {
- Event Player.BotEventPosition = Random Value In Array(Global.BigBossSpawnPositions);
- Create Effect(All Players(All Teams), Light Shaft, Color(Red), Event Player.BotEventPosition, 3, Visible To);
- Event Player.BotEffects[0] = Last Created Entity;
- Create Effect(All Players(All Teams), Smoke Sound, Color(White), Position Of(Event Player), 100, Visible To Position and Radius);
- Event Player.BotEffects[1] = Last Created Entity;
- Teleport(Event Player, Event Player.BotEventPosition + Vector(0, 25, 0));
- Set Gravity(Event Player, 50);
- Wait(0.020, Ignore Condition);
- While(Is In Air(Event Player) == True);
- Play Effect(All Players(All Teams), Good Pickup Effect, Color(Orange), Position Of(Event Player) + Vector(0, -2, 0), 2);
- Wait(0.100, Ignore Condition);
- End;
- Set Gravity(Event Player, 100);
- Play Effect(All Players(All Teams), Good Explosion, Custom Color(105, 87, 46, 255), Position Of(Event Player), 8);
- Play Effect(All Players(All Teams), Explosion Sound, Color(White), Position Of(Event Player), 150);
- Destroy Effect(Event Player.BotEffects[0]);
- Destroy Effect(Event Player.BotEffects[1]);
- }
- }
- disabled rule("=== PLAYER MECHANICS ===")
- {
- event
- {
- Ongoing - Global;
- }
- }
- disabled rule("PLAYER: DARKNESS")
- {
- event
- {
- Ongoing - Each Player;
- Team 1;
- All;
- }
- conditions
- {
- Is Button Held(Event Player, Button(Ultimate)) == True;
- !Entity Exists(Event Player.BotEffects) == True;
- }
- actions
- {
- Disable Nameplates(Event Player, All Players(All Teams));
- Start Forcing Player Outlines(Event Player, All Players(All Teams), False, Color(White), Default);
- Create Effect(Event Player, Bad Aura, Color(Black), Update Every Frame(Eye Position(Event Player) + Vector(0, 2, 0)
- + Facing Direction Of(Event Player) * 14), 25, Visible To Position and Radius);
- Event Player.BotEffects = Last Created Entity;
- Create Effect(Event Player, Bad Aura, Color(Black), Update Every Frame(Eye Position(Event Player) + World Vector Of(Vector(-5, 0,
- 3), Event Player, Rotation) + Facing Direction Of(Event Player) * 10), 25, Visible To Position and Radius);
- Create Effect(Event Player, Bad Aura, Color(Black), Update Every Frame(Eye Position(Event Player) + World Vector Of(Vector(5, 0,
- 3), Event Player, Rotation) + Facing Direction Of(Event Player) * 10), 25, Visible To Position and Radius);
- }
- }
- rule("PLAYER: HEALTH REGEN")
- {
- event
- {
- Player Took Damage;
- Team 1;
- All;
- }
- actions
- {
- Stop Heal Over Time(Event Player.HealOverTimeId);
- Event Player.EventHealth = Health(Event Player);
- Wait(4, Ignore Condition);
- "TOOK DAMAGE, RESET REGENERATION TIMER"
- Loop If(Is Alive(Event Player) && Event Player.EventHealth > Health(Event Player));
- Start Heal Over Time(Event Player, Event Player, 3, Max Health(Event Player) / 3);
- Event Player.HealOverTimeId = Last Heal Over Time ID;
disabled Wait Until(Health(Event Player) == Max Health(Event Player), 3);
disabled Stop Heal Over Time(Event Player.HealOverTimeId);
- }
- }
- disabled rule("=== ZENYATTA ===")
- {
- event
- {
- Ongoing - Global;
- }
- }
- rule("BOT: ZEN - REACHED THE GATE")
- {
- event
- {
- Ongoing - Each Player;
- Team 2;
- Zenyatta;
- }
- conditions
- {
- Is Dummy Bot(Event Player) == True;
- Has Spawned(Event Player) == True;
- Is Alive(Event Player) == True;
- Distance Between(Position Of(Event Player), Position Of(Global.GatePosition)) < 2.700;
- }
- actions
- {
- Set Ammo(Event Player, 0, 0);
- Communicate(Event Player, Hello);
- Call Subroutine(BotResetPathFinding);
- Wait(1.500, Ignore Condition);
- Abort If(Is Dead(Event Player) == True);
- Play Effect(All Players(All Teams), Good Explosion, Color(Red), Eye Position(Event Player), 2.500);
- Play Effect(All Players(All Teams), Explosion Sound, Color(Red), Eye Position(Event Player), 70);
Damage(Players Within Radius(Eye Position(Event Player), 4, Team 1, Surfaces And All Barriers), Event Player, 25);
- Damage(Players Within Radius(Eye Position(Event Player), 4, Team 1, Surfaces And All Barriers), Event Player, 20);
- Kill(Event Player, Null);
If(Distance Between(Eye Position(Event Player), Global.GatePosition) < 3);
- If(Distance Between(Position Of(Event Player), Global.GatePosition) < 3 && Is In Line of Sight(Eye Position(Event Player),
- Global.GatePosition, Enemy Barriers Block LOS));
- Global.GateHealth -= 25;
- Start Rule(GateProgressBarColor, Restart Rule);
- End;
- Teleport(Event Player, Vector(0, -999, 0));
- }
- }
- rule("SUBROUTINE: ZEN - RESPAWN")
- {
- event
- {
- Subroutine;
- BotZenyattaRespawn;
- }
- actions
- {
- Start Scaling Player(Event Player, 1, False);
- Set Max Health(Event Player, 100);
- Set Move Speed(Event Player, 45 + 5 * Global.TimeMin);
- Set Status(Event Player, Null, Knocked Down, 9999);
- Wait(0.200, Ignore Condition);
- Set Gravity(Event Player, 20);
- Disable Movement Collision With Environment(Event Player, True);
- Teleport(Event Player, Global.ZenSpawnPositions[Random Integer(Min(Global.TimeMin, Count Of(Global.ZenSpawnPositions) - 5), Min(
- Global.SpawnPositionMaxId, Count Of(Global.ZenSpawnPositions) - 1))] + Vector(0, -1.500, 0));
- Wait(0.016, Ignore Condition);
- Play Effect(All Players(All Teams), Bad Explosion, Custom Color(220, 175, 100, 255), Position Of(Event Player), 3);
- Play Effect(All Players(All Teams), Debuff Impact Sound, Color(Gray), Eye Position(Event Player), 50);
- Apply Impulse(Event Player, Up, 3.500, To World, Cancel Contrary Motion);
- Wait(0.400, Ignore Condition);
- Clear Status(Event Player, Knocked Down);
- Set Gravity(Event Player, 100);
- Enable Movement Collision With Environment(Event Player);
- Start Facing(Event Player, Direction Towards(Eye Position(Event Player), Global.NodePositions[Event Player.BotPathCurrentNodeId]),
- 100, To World, Direction and Turn Rate);
- Event Player.BotTargetPosition = Global.GatePosition;
- Start Rule(BotStartPathFinding, Restart Rule);
- }
- }
- disabled rule("=== WRECKING BALL ===")
- {
- event
- {
- Ongoing - Global;
- }
- }
- rule("BOT: BALL - REACHED THE GATE")
- {
- event
- {
- Ongoing - Each Player;
- Team 2;
- Wrecking Ball;
- }
- conditions
- {
- Is Dummy Bot(Event Player) == True;
- Has Spawned(Event Player) == True;
- Is Alive(Event Player) == True;
- Distance Between(Position Of(Event Player), Global.GatePosition) < 3;
- }
- actions
- {
- Start Holding Button(Event Player, Button(Ability 1));
- Set Ammo(Event Player, 0, 0);
- Wait(1, Ignore Condition);
- Set Ultimate Charge(Event Player, 100);
- Start Holding Button(Event Player, Button(Ultimate));
- Wait Until(Is Using Ultimate(Event Player), 0.500);
- Abort If(Is Dead(Event Player));
- Kill(Event Player, Null);
- Destroy Effect(Event Player.BotEffects);
- Play Effect(All Players(All Teams), Bad Explosion, Color(Orange), Eye Position(Event Player), 6);
- Play Effect(All Players(All Teams), Ring Explosion Sound, Color(White), Eye Position(Event Player), 200);
If(Distance Between(Position Of(Event Player), Global.GatePosition) < 3.500);
- If(Distance Between(Position Of(Event Player), Global.GatePosition) < 3.500 && Is In Line of Sight(Eye Position(Event Player),
- Global.GatePosition, Enemy Barriers Block LOS));
- Global.GateHealth -= 100;
- Start Rule(GateProgressBarColor, Restart Rule);
- End;
- Damage(Players Within Radius(Eye Position(Event Player), 7, Team 1, Surfaces And All Barriers), Event Player, 200);
- }
- }
- rule("BOT: BALL - ALTERNATIVE FORM")
- {
- event
- {
- Ongoing - Each Player;
- Team 2;
- Wrecking Ball;
- }
- conditions
- {
- Is Dummy Bot(Event Player) == True;
- Has Spawned(Event Player) == True;
- Is In Alternate Form(Event Player) == False;
- }
- actions
- {
- Start Holding Button(Event Player, Button(Ability 1));
- Wait Until(Is In Alternate Form(Event Player), 10);
- Stop Holding Button(Event Player, Button(Ability 1));
- }
- }
- rule("SUBROUTINE: BALL - RESPAWN")
- {
- event
- {
- Subroutine;
- BotBallRespawn;
- }
- actions
- {
- Start Scaling Player(Event Player, 1, False);
- Set Max Health(Event Player, 60 + Count Of(All Players(Team 1)) * 20);
- Set Move Speed(Event Player, 40 + Global.TimeMin);
- Set Ultimate Charge(Event Player, 0);
- Set Invisible(Event Player, All);
- Teleport(Event Player, Random Value In Array(Global.BallSpawnPositions) + Vector(0, 20, 0));
- Start Holding Button(Event Player, Button(Crouch));
- Wait(0.700, Ignore Condition);
- Set Invisible(Event Player, None);
- Play Effect(All Players(All Teams), Good Explosion, Color(White), Event Player, 3);
- Wait Until(Is On Ground(Event Player), 99999);
- Play Effect(All Players(All Teams), Ring Explosion, Color(Gray), Position Of(Event Player), 10);
- Stop Holding Button(Event Player, Button(Crouch));
- Event Player.BotTargetPosition = Global.GatePosition;
- Create Effect(All Players(All Teams), Bad Aura, Color(Orange), Eye Position(Event Player), 1.500, Visible To Position and Radius);
- Event Player.BotEffects = Last Created Entity;
- Start Rule(BotStartPathFinding, Restart Rule);
- }
- }
- disabled rule("=== WIDOW ===")
- {
- event
- {
- Ongoing - Global;
- }
- }
- rule("BOT: WIDOW - MAIN LOGIC")
- {
- event
- {
- Ongoing - Each Player;
- Team 2;
- Widowmaker;
- }
- conditions
- {
- Is Dummy Bot(Event Player) == True;
- Has Spawned(Event Player) == True;
- Is Alive(Event Player) == True;
- Event Player.IsRespawning == False;
- Event Player.BotDoesUniqueBehaviour == False;
- }
- actions
- {
Event Player.BotSeePlayer = Sorted Array(Filtered Array(All Living Players(Team 1), Is In Line of Sight(Eye Position(Event Player),
Eye Position(Current Array Element), Barriers Do Not Block LOS) == True), Distance Between(Position Of(Event Player),
Position Of(Current Array Element)))[0];
- Event Player.BotSeePlayer = Sorted Array(Filtered Array(All Living Players(Team 1), Has Spawned(Current Array Element)
- == True && Is In Line of Sight(Eye Position(Event Player), Eye Position(Current Array Element), Barriers Do Not Block LOS)
- == True), Distance Between(Position Of(Event Player), Position Of(Current Array Element)))[0];
- "SEE THE PLAYER"
- If(Event Player.BotSeePlayer != Null && !Is Reloading(Event Player));
- Create Beam Effect(All Players(All Teams), Good Beam, Eye Position(Event Player), Update Every Frame(Ray Cast Hit Position(
- Eye Position(Event Player), Eye Position(Event Player) + Facing Direction Of(Event Player) * 999, Null, Event Player, True)),
- Color(Red), Visible To Position and Radius);
- Event Player.BotEffects = Last Created Entity;
- Start Facing(Event Player, Direction Towards(Eye Position(Event Player), Eye Position(Event Player.BotSeePlayer) - (Hero Of(
- Event Player.BotSeePlayer) == Hero(Wrecking Ball) ? Vector(0, 0.200, 0) : Vector(0, 0, 0))), 9999, To World,
- Direction and Turn Rate);
- Wait Until(Is Dead(Event Player), 0.800 + Random Real(0, 0.500));
- Destroy Effect(Event Player.BotEffects);
- Press Button(Event Player, Button(Primary Fire));
- Else;
- Stop Facing(Event Player);
- Set Facing(Event Player, Direction Towards(Eye Position(Event Player), Objective Position(2)), To World);
- End;
- If(!Event Player.BotIsPathFinding && Distance Between(Position Of(Event Player), Event Player.BotEventPosition) > 1);
- Event Player.BotTargetPosition = Event Player.BotEventPosition;
- Call Subroutine(BotStartPathFinding);
- Else If(Event Player.BotIsPathFinding && Distance Between(Position Of(Event Player), Event Player.BotEventPosition) < 1);
- Call Subroutine(BotResetPathFinding);
- End;
- Wait(1, Ignore Condition);
- Event Player.BotCounter += 1;
- "TELEPORT TO NEW POSITION"
- If(Event Player.BotCounter > 6);
- Event Player.IsDead = True;
- Play Effect(All Players(All Teams), Good Pickup Effect, Color(White), Event Player, 2);
- Respawn(Event Player);
- End;
- Loop If Condition Is True;
- }
- }
- rule("SUBROUTINE: WIDOW - RESPAWN")
- {
- event
- {
- Subroutine;
- BotWidowRespawn;
- }
- actions
- {
- Event Player.BotCounter = 0;
- Start Scaling Player(Event Player, 1, False);
- Set Max Health(Event Player, 100 + Count Of(All Players(Team 1)) * 15);
- Set Move Speed(Event Player, 100);
- Set Invisible(Event Player, All);
- Teleport(Event Player, Filtered Array(Global.SniperPositions, Distance Between(Event Player.BotEventPosition,
- Current Array Element) > 5)[Random Integer(0, Count Of(Global.SniperPositions) - 2)]);
- Wait(0.020, Ignore Condition);
- Event Player.BotEventPosition = Position Of(Event Player);
- Set Facing(Event Player, Direction Towards(Eye Position(Event Player), Objective Position(2)), To World);
- Set Invisible(Event Player, None);
- Play Effect(All Players(All Teams), Good Pickup Effect, Color(White), Event Player, 2);
- Play Effect(All Players(All Teams), Debuff Impact Sound, Color(White), Event Player, 100);
- Wait(0.700, Ignore Condition);
- Press Button(Event Player, Button(Crouch));
- Start Holding Button(Event Player, Button(Secondary Fire));
- }
- }
- disabled rule("=== BASTION ===")
- {
- event
- {
- Ongoing - Global;
- }
- }
- rule("HOG: NERF FOR BASTION && ORISA")
- {
- event
- {
- Player Dealt Damage;
- Team 1;
- Roadhog;
- }
- conditions
- {
- Event Ability == Button(Ability 1);
- (Hero Of(Victim) == Hero(Bastion) || Hero Of(Victim) == Hero(Orisa)) == True;
- }
- actions
- {
- Set Status(Event Player, Null, Stunned, 0.005);
- }
- }
- rule("BOT: BASTION - MAIN LOGIC")
- {
- event
- {
- Ongoing - Each Player;
- Team 2;
- Bastion;
- }
- conditions
- {
- Is Dummy Bot(Event Player) == True;
- Event Player.BotIsOrisaChild == False;
- Has Spawned(Event Player) == True;
- Is Alive(Event Player) == True;
- Event Player.IsRespawning == False;
- Event Player.BotDoesUniqueBehaviour == False;
- }
- actions
- {
Event Player.BotSeePlayer = Sorted Array(Filtered Array(All Living Players(Team 1), Is In Line of Sight(Eye Position(Event Player),
Eye Position(Current Array Element), Barriers Do Not Block LOS) == True), Distance Between(Position Of(Event Player),
Position Of(Current Array Element)))[0];
- Event Player.BotSeePlayer = Sorted Array(Filtered Array(All Living Players(Team 1), Has Spawned(Current Array Element)
- == True && Is In Line of Sight(Eye Position(Event Player), Eye Position(Current Array Element), Barriers Do Not Block LOS)
- == True), Distance Between(Position Of(Event Player), Position Of(Current Array Element)))[0];
- "SEE THE PLAYER"
- If(Event Player.BotSeePlayer != Null);
- Stop Holding Button(Event Player, Button(Secondary Fire));
- Start Facing(Event Player, Direction Towards(Eye Position(Event Player), Eye Position(Event Player.BotSeePlayer) - Vector(0, 0.500,
- 0)), 100, To World, Direction and Turn Rate);
- "SELF REPAIRING"
- Else If(!Is Firing Secondary(Event Player) && Health(Event Player) < Max Health(Event Player));
- Start Holding Button(Event Player, Button(Secondary Fire));
- End;
- "START FOLLOW PATH"
- If(!Event Player.BotIsPathFinding && !Event Player.BotDoesUniqueBehaviour);
- Start Rule(BotResetPathFinding, Do Nothing);
- Wait(0.050, Ignore Condition);
- Event Player.BotTargetPosition = Random Value In Array(Global.BigBossTargetPositions);
- Start Facing(Event Player, Direction Towards(Eye Position(Event Player), Event Player.BotTargetPosition + Vector(0, 2, 0)), 100,
- To World, Direction and Turn Rate);
- Start Rule(BotStartPathFinding, Do Nothing);
- "REACHED PATH TARGET"
- Else If(Distance Between(Position Of(Event Player), Event Player.BotTargetPosition) <= 3);
- Start Rule(BotResetPathFinding, Do Nothing);
- End;
- Wait(1, Ignore Condition);
- Loop If Condition Is True;
- }
- }
- rule("BOT: BASTION - ARTILLERY")
- {
- event
- {
- Ongoing - Each Player;
- Team 2;
- Bastion;
- }
- conditions
- {
- Is Dummy Bot(Event Player) == True;
- Event Player.BotIsOrisaChild == False;
- Has Spawned(Event Player) == True;
- Is Alive(Event Player) == True;
- Event Player.BotSeePlayer == True;
- Is Reloading(Event Player) == False;
- Event Player.BotDoesUniqueBehaviour == False;
- Is In View Angle(Event Player, Position Of(Event Player.BotSeePlayer), 30) == True;
- Distance Between(Position Of(Event Player), Position Of(Event Player.BotSeePlayer)) > 21;
- Distance Between(Eye Position(Event Player), Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)
- + Up * 99, Null, Event Player, False)) >= 35;
- }
- actions
- {
- "TRYING TO CAPTURE TARGET"
- Wait(1, Abort When False);
- "CAPTURE TARGET"
- Event Player.BotDoesUniqueBehaviour = True;
- Stop Throttle In Direction(Event Player);
- Create Beam Effect(All Players(All Teams), Bad Beam, Update Every Frame(Eye Position(Event Player)), Update Every Frame(
- Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player) + Facing Direction Of(Event Player) * 1000,
- All Living Players(Team 1), Event Player, True)), Color(Sky Blue), Visible To Position and Radius);
- Event Player.BotEffects = Last Created Entity;
- Wait(1.900, Ignore Condition);
- Destroy Effect(Event Player.BotEffects);
- Abort If(Is Dead(Event Player));
- Event Player.BotEventPosition = Position Of(Event Player.BotSeePlayer);
- "SHOOT FROM ARTILLERY"
- Event Player.BotBastionArtilleryDidShotsCount = 0;
- For Player Variable(Event Player, BotLoopIterator1, 0, 4, 1);
- Event Player.BotBastionArtilleryDidShotsCount += 1;
- Play Effect(All Players(All Teams), Debuff Impact Sound, Color(White), Eye Position(Event Player), 150);
- Play Effect(All Players(All Teams), Good Explosion, Color(Orange), Eye Position(Event Player) + World Vector Of(Vector(0, 1.400,
- -0.700), Event Player, Rotation), 2);
- Create Beam Effect(All Players(All Teams), Bad Beam, Eye Position(Event Player) + World Vector Of(Vector(0, 1.400, -0.700),
- Event Player, Rotation), Eye Position(Event Player) + World Vector Of(Vector(Random Real(-1, 1), Random Integer(20, 40),
- Random Real(0.500, 1.500)), Event Player, Rotation), Color(Orange), Visible To);
- Event Player.BotEffects = Last Created Entity;
- Wait(0.050, Ignore Condition);
- Destroy Effect(Event Player.BotEffects);
- Wait(0.400, Ignore Condition);
- If(Is Dead(Event Player));
- Break;
- End;
- End;
- Call Subroutine(BotResetPathFinding);
- Start Rule(BotStartPathFinding, Do Nothing);
- Wait(1.500, Ignore Condition);
- Start Rule(BotBastionArtilleryDamage, Do Nothing);
- Wait(4, Ignore Condition);
- }
- }
- rule("BOT: BASTION - FLAME GUN")
- {
- event
- {
- Ongoing - Each Player;
- Team 2;
- Bastion;
- }
- conditions
- {
- Is Dummy Bot(Event Player) == True;
- Event Player.BotIsOrisaChild == False;
- Has Spawned(Event Player) == True;
- Is Alive(Event Player) == True;
- Event Player.BotSeePlayer == True;
- Is Reloading(Event Player) == False;
- Event Player.BotDoesUniqueBehaviour == False;
- Is In View Angle(Event Player, Position Of(Event Player.BotSeePlayer), 50) == True;
- Distance Between(Position Of(Event Player), Position Of(Event Player.BotSeePlayer)) < 8;
- }
- actions
- {
- Event Player.BotDoesUniqueBehaviour = True;
- Stop Holding Button(Event Player, Button(Primary Fire));
- Create Effect(All Players(All Teams), Bad Aura, Color(Orange), Update Every Frame(Eye Position(Event Player) + World Vector Of(
- Vector(-1, -1.200, 1.800), Event Player, Rotation)), 1, Visible To Position and Radius);
- Event Player.BotEffects = Last Created Entity;
- Start Rule(BotBastionFlameGunDamage, Do Nothing);
- Wait(1.100, Ignore Condition);
- Destroy Effect(Event Player.BotEffects);
- Wait(4, Ignore Condition);
- Loop If Condition Is True;
- }
- }
- rule("BOT: BASTION - PRIMARY FIRE")
- {
- event
- {
- Ongoing - Each Player;
- Team 2;
- Bastion;
- }
- conditions
- {
- Is Dummy Bot(Event Player) == True;
- Event Player.BotIsOrisaChild == False;
- Has Spawned(Event Player) == True;
- Is Alive(Event Player) == True;
- Event Player.BotSeePlayer == True;
- Event Player.BotDoesUniqueBehaviour == False;
- Is In View Angle(Event Player, Position Of(Event Player.BotSeePlayer), 30) == True;
- }
- actions
- {
- Start Holding Button(Event Player, Button(Primary Fire));
- Wait(1, Ignore Condition);
- Stop Holding Button(Event Player, Button(Primary Fire));
- Wait(1, Ignore Condition);
- Loop If Condition Is True;
- }
- }
- rule("SUBROUTINE: BASTION - RESPAWN")
- {
- event
- {
- Subroutine;
- BotBastionRespawn;
- }
- actions
- {
- Abort If(Event Player.BotIsOrisaChild == True);
- Set Max Health(Event Player, 150 + Count Of(All Players(Team 1)) * 150);
- Start Scaling Player(Event Player, 2, False);
- Set Move Speed(Event Player, 80);
- Call Subroutine(BotLandingFromSky);
- Set Ammo(Event Player, 0, 0);
- Wait Until(!Is Reloading(Event Player), 99999);
- Event Player.BotTargetPosition = Vector(0, 999, 0);
- }
- }
- rule("SUBROUTINE: BASTION - ARTILLERY DAMAGE")
- {
- event
- {
- Subroutine;
- BotBastionArtilleryDamage;
- }
- actions
- {
- Event Player.BotDoesUniqueBehaviour = False;
- "EXPLOSIONS OF ARTILLERY"
- For Player Variable(Event Player, BotLoopIterator2, 0, Event Player.BotBastionArtilleryDidShotsCount, 1);
- Event Player.BotEventPosition = Ray Cast Hit Position(Event Player.BotEventPosition + Vector(0, 50, 0),
- Event Player.BotEventPosition + Vector(Random Integer(-4, 4), -15, Random Integer(-4, 4)), Null, Event Player, True);
- Damage(Players Within Radius(Event Player.BotEventPosition, 8, Team 1, Surfaces And Enemy Barriers), Event Player, 50);
- Play Effect(All Players(All Teams), Explosion Sound, Color(White), Event Player.BotEventPosition, 150);
- Play Effect(All Players(All Teams), Good Explosion, Color(Orange), Event Player.BotEventPosition, 5);
- Create Beam Effect(All Players(All Teams), Bad Beam, Event Player.BotEventPosition, Event Player.BotEventPosition + Vector(0, 25,
- 0), Color(Orange), Visible To);
- Event Player.BotEffects = Last Created Entity;
- Wait(0.050, Ignore Condition);
- Destroy Effect(Event Player.BotEffects);
- Wait(0.400, Ignore Condition);
- End;
- }
- }
- rule("SUBROUTINE: BASTION - FLAME GUN DAMAGE")
- {
- event
- {
- Subroutine;
- BotBastionFlameGunDamage;
- }
- actions
- {
- Event Player.BotRayCastHitPosition = Eye Position(Event Player) + World Vector Of(Vector(-1, -1.200, 1.800), Event Player,
- Rotation);
- "FIRE PARTICLES OF FLAME GUN"
- For Player Variable(Event Player, BotLoopIterator1, 1, 13, 3);
- Event Player.BotEventPosition = Ray Cast Hit Position(Event Player.BotRayCastHitPosition,
- Event Player.BotRayCastHitPosition + Facing Direction Of(Event Player) * Event Player.BotLoopIterator1, Null, Event Player,
- True);
- Damage(Players Within Radius(Event Player.BotEventPosition, 4, Team 1, Surfaces And Enemy Barriers), Event Player, 20);
- Set Status(Players Within Radius(Event Player.BotEventPosition, 4, Team 1, Off), Event Player, Burning, 2);
- Play Effect(All Players(All Teams), Debuff Impact Sound, Color(White), Event Player.BotEventPosition, 150);
- Play Effect(All Players(All Teams), Bad Explosion, Color(Orange), Event Player.BotEventPosition, 2.500);
- Wait(0.200, Ignore Condition);
- End;
- Event Player.BotDoesUniqueBehaviour = False;
- }
- }
- disabled rule("=== ORISA + BASTION ===")
- {
- event
- {
- Ongoing - Global;
- }
- }
- rule("SUBROUTINE: ORISA - RESPAWN")
- {
- event
- {
- Subroutine;
- BotOrisaRespawn;
- }
- actions
- {
- Global.BotOrisaParent = Event Player;
- "NO BASTION CREATED"
- If(Count Of(Filtered Array(All Players(Team 2), Hero Of(Current Array Element) == Hero(Bastion))) == 0);
- If(Count Of(Filtered Array(All Players(Team 2), Hero Of(Event Player) == Hero(Wrecking Ball))) == 0);
- End;
- "WAITING FOR BALL DEAD"
- Wait Until(Is True For Any(All Players(Team 2), Is Dead(Current Array Element) && Hero Of(Current Array Element) == Hero(
- Wrecking Ball)), 99999);
- Destroy Dummy Bot(Team 2, Slot Of(Global.CurrentBot));
- Wait(0.050, Ignore Condition);
- Create Dummy Bot(Hero(Bastion), Team 2, -1, Vector(999, 999, 999), Vector(-1, 0, 0));
- Global.BotOrisaChild = Last Created Entity;
- "ANY BASTION ALREADY EXISTS IN GAME"
- Else;
- "WAITING FOR BASTION DEAD"
- Wait Until(Is True For Any(All Players(Team 2), Is Dead(Current Array Element) && Hero Of(Current Array Element) == Hero(Bastion)),
- 99999);
- "MAKE HIM AS ORISA CHILD"
- Global.BotOrisaChild = Filtered Array(All Players(Team 2), Is Dead(Current Array Element) && Hero Of(Current Array Element)
- == Hero(Bastion))[0];
- End;
- Global.BotOrisaChild.BotIsOrisaChild = True;
- Global.BotOrisaChild.BotDoesUniqueBehaviour = True;
- Wait(1, Ignore Condition);
- Respawn(Global.BotOrisaChild);
- Set Facing(Global.BotOrisaChild, Vector(X Component Of(Facing Direction Of(Event Player)), 9999, Z Component Of(
- Facing Direction Of(Event Player))), To World);
- Start Scaling Player(Global.BotOrisaParent, 1.800, False);
- Start Scaling Player(Global.BotOrisaChild, 1.800, False);
Set Max Health(Event Player, 200 + Count Of(All Players(Team 1)) * 200);
- Set Max Health(Event Player, 200 + Count Of(All Players(Team 1)) * 80);
- Set Move Speed(Event Player, 90);
- Set Damage Dealt(Global.BotOrisaChild, 1000);
- Set Status(Global.BotOrisaChild, Null, Phased Out, 9999);
- Disable Nameplates(Global.BotOrisaChild, All Players(All Teams));
- Stop Holding Button(Global.BotOrisaChild, Button(Primary Fire));
- Wait(0.250, Ignore Condition);
- Start Holding Button(Global.BotOrisaChild, Button(Ability 1));
- Wait Until(Is In Alternate Form(Global.BotOrisaChild), 5);
- Stop Holding Button(Global.BotOrisaChild, Button(Ability 1));
- Attach Players(Global.BotOrisaChild, Global.BotOrisaParent, Vector(0, 1.800, 0.230));
- Call Subroutine(BotLandingFromSky);
- Event Player.BotTargetPosition = Global.BotOrisaTargetPosition;
- Start Facing(Global.BotOrisaChild, Vector(X Component Of(Facing Direction Of(Event Player)), 999, Z Component Of(
- Facing Direction Of(Event Player))), 100, To World, Direction and Turn Rate);
- Start Facing(Event Player, Direction Towards(Vector(X Component Of(Eye Position(Event Player)), 0, Z Component Of(Eye Position(
- Event Player))), Vector(X Component Of(Global.NodePositions[Event Player.BotPathCurrentNodeId]), 0, Z Component Of(
- Global.NodePositions[Event Player.BotPathCurrentNodeId]))), 360, To World, Direction and Turn Rate);
- Start Rule(BotStartPathFinding, Restart Rule);
- }
- }
- rule("BOT: ORISA - REACHED TARGET POSITION")
- {
- event
- {
- Ongoing - Each Player;
- Team 2;
- Orisa;
- }
- conditions
- {
- Is Dummy Bot(Event Player) == True;
- Has Spawned(Event Player) == True;
- Is Alive(Event Player) == True;
- Event Player.BotIsPathFinding == True;
- Distance Between(Position Of(Event Player), Global.BotOrisaTargetPosition) < 1.500;
- }
- actions
- {
- Call Subroutine(BotResetPathFinding);
- Start Facing(Event Player, Direction Towards(Eye Position(Event Player), Vector(X Component Of(Global.GatePosition), -999,
- Z Component Of(Global.GatePosition))), 80, To World, Direction and Turn Rate);
- Start Facing(Global.BotOrisaChild, Direction Towards(Eye Position(Event Player), Is In Line of Sight(Eye Position(Event Player),
- Global.GatePosition, Barriers Do Not Block LOS) ? Global.GatePosition : Sorted Array(Filtered Array(All Players(Team 1),
- Is Alive(Current Array Element)), Distance Between(Eye Position(Event Player), Position Of(Current Array Element)))[0]), 200,
- To World, Direction and Turn Rate);
- disabled Start Facing(Global.BotOrisaChild, Direction Towards(Eye Position(Event Player), Is In Line of Sight(Eye Position(Event Player),
- Global.GatePosition, Barriers Do Not Block LOS) ? Global.GatePosition : Sorted Array(Filtered Array(All Players(Team 1),
- Is Alive(Current Array Element) && Is In Line of Sight(Eye Position(Event Player), Position Of(Current Array Element),
- Barriers Do Not Block LOS)), Distance Between(Eye Position(Event Player), Position Of(Current Array Element)))[0]), 200,
- To World, Direction and Turn Rate);
- Press Button(Event Player, Button(Ability 1));
- Wait Until(Y Component Of(Facing Direction Of(Event Player)) < -0.300, 99999);
- Press Button(Event Player, Button(Ability 2));
- Wait(0.800, Ignore Condition);
- Global.BotOrisaChild.BotDoesUniqueBehaviour = False;
- }
- }
- rule("BOT: ORISA-BASTION - SHOOT")
- {
- event
- {
- Ongoing - Each Player;
- Team 2;
- Bastion;
- }
- conditions
- {
- Is Dummy Bot(Event Player) == True;
- Event Player.BotIsOrisaChild == True;
- Has Spawned(Event Player) == True;
- Is Alive(Event Player) == True;
- Event Player.BotDoesUniqueBehaviour == False;
- }
- actions
- {
- Event Player.BotDoesUniqueBehaviour = True;
- While(Is Alive(Event Player));
- Create Effect(All Players(All Teams), Bad Aura, Color(Purple), Eye Position(Event Player) - Vector(0, 0.700, 0)
- + Facing Direction Of(Event Player) * 3.200, 1, Visible To Position and Radius);
- Event Player.BotEffects = Last Created Entity;
- Wait(1.500, Ignore Condition);
- Destroy Effect(Event Player.BotEffects);
- Abort If(Is Dead(Event Player));
- Press Button(Event Player, Button(Primary Fire));
- Press Button(Event Player, Button(Reload));
- Event Player.BotRayCastHitPosition = Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)
- + Facing Direction Of(Event Player) * 999, All Players(Team 1), All Players(Team 2), True);
- "ANTI-SHIELD BUG"
- Event Player.BotRayCastHitPosition = Event Player.BotRayCastHitPosition + Direction Towards(Event Player.BotRayCastHitPosition,
- Eye Position(Event Player)) * 0.200;
- Create Beam Effect(All Players(All Teams), Bad Beam, Eye Position(Event Player) - Vector(0, 0.700, 0) + Facing Direction Of(
- Event Player) * 3, Event Player.BotRayCastHitPosition, Color(Purple), Visible To Position and Radius);
- Event Player.BotEffects = Last Created Entity;
- Damage(Players Within Radius(Event Player.BotRayCastHitPosition, 4, Team 1, Surfaces And All Barriers), Event Player, 0.050);
- Play Effect(All Players(All Teams), Good Explosion, Color(Purple), Event Player.BotRayCastHitPosition, 4);
- Play Effect(All Players(All Teams), Explosion Sound, Color(Purple), Event Player.BotRayCastHitPosition, 200);
- Play Effect(All Players(All Teams), Bad Explosion, Color(Purple), Eye Position(Event Player) + Facing Direction Of(Event Player)
- * 3.300, 2);
- Play Effect(All Players(All Teams), Ring Explosion Sound, Color(Purple), Eye Position(Event Player), 200);
"DAMAGE GATE"
If(Distance Between(Event Player.BotRayCastHitPosition, Global.GatePosition) < 4);
Global.GateHealth -= 25;
- If(Distance Between(Event Player.BotRayCastHitPosition, Global.GatePosition) < 4 && Is In Line of Sight(
- Event Player.BotRayCastHitPosition, Global.GatePosition, Enemy Barriers Block LOS));
- Global.GateHealth -= 30;
- Start Rule(GateProgressBarColor, Restart Rule);
- End;
- Wait(0.150, Ignore Condition);
- Destroy Effect(Event Player.BotEffects);
- Wait(0.060, Ignore Condition);
- Wait Until(!Is Reloading(Event Player), 2.500);
- End;
- }
- }
- rule("BOT: ORISA-BASTION - CAN'T SEE THE TARGET")
- {
- event
- {
- Ongoing - Each Player;
- Team 2;
- Orisa;
- }
- conditions
- {
- Is Dummy Bot(Event Player) == True;
- Has Spawned(Event Player) == True;
- Is Alive(Event Player) == True;
- Event Player.IsRespawning == False;
- Event Player.BotIsPathFinding == False;
- Is In Line of Sight(Eye Position(Event Player), Global.GatePosition, Barriers Do Not Block LOS) == False;
- }
- actions
- {
- Event Player.BotTargetPosition = Global.BotOrisaTargetPosition;
- Start Rule(BotStartPathFinding, Restart Rule);
- }
- }
disabled rule("=== PATH BUILDER MODE IMPORT ===")
{
event
{
Ongoing - Global;
}
}
rule("MAP: HAVANA")
{
event
{
Ongoing - Global;
}
conditions
{
Current Map == Map(Havana);
}
actions
{
Global.NodePositions = Array(Vector(126.542, 12.733, -63.277), Vector(113.402, 7.319, -57.302), Vector(147.588, 6.425, -46.749),
Vector(136.181, 6.425, -57.159), Vector(130.189, 6.425, -63.781), Vector(123.305, 6.425, -57.983), Vector(125.678, 6.504,
-46.633), Vector(146.311, 9.444, -61.382), Vector(114.485, 7.471, -46.699), Vector(138.743, 6.425, -32.974), Vector(126.498,
6.425, -39.920), Vector(148.529, 9.425, -28.549), Vector(134.970, 10.396, -27.167), Vector(124.572, 10.434, -34.300), Vector(
138.605, 5.359, -18.647), Vector(119.009, 2.331, -31.024), Vector(121.138, 5.228, -19.933), Vector(126.722, 6.425, -29.505),
Vector(102.762, 3.157, -33.609), Vector(76.030, 7.418, -74.087), Vector(83.720, 9.425, -33.744), Vector(97.439, 7.238,
-42.379), Vector(86.252, 12.416, -47.261), Vector(65.178, 11.425, -73.187), Vector(97.466, 7.269, -50.596), Vector(99.937,
2.983, -67.099), Vector(113.039, 7.424, -37.337), Vector(106.552, 0.149, -53.045), Vector(120.953, 13.171, -58.443), Vector(
106.179, 7.450, -46.143), Vector(90.086, 7.411, -44.653), Vector(78.752, 7.418, -62.140), Vector(82.124, 7.428, -44.229),
Vector(90.675, 7.231, -51.234), Vector(85.717, 4.692, -63.446), Vector(90.830, 4.330, -70.697), Vector(95.569, 3.646, -79.682),
Vector(102.425, 2.387, -72.817), Vector(81.443, 4.425, -81.648), Vector(70.743, 6.418, -81.495), Vector(69.738, 6.419,
-96.344), Vector(78.682, 5.418, -96.160), Vector(153.887, 18.628, -22.387));
Global.NodeConnections = Array(Array(7, 3, 6, 28), Array(5, 8, 27), Array(3, 9, 6, 10), Array(4, 7, 2, 6, 9, 10), Array(3, 5),
Array(4, 6, 1), Array(5, 3, 8, 10, 9, 2), Array(3, 0), Array(1, 6, 10, 26, 29), Array(10, 11, 2, 6, 3, 14, 17), Array(6, 8, 9,
2, 3, 17), Array(9, 12), Array(11, 9, 13), Array(12, 10), Array(9, 16), Array(16, 18), Array(14, 15, 18), Array(9, 15), Array(
15, 21, 27), Array(23, 31, 39), Array(22, 32), Array(18, 24, 30, 29, 33), Array(20, 30, 21, 33, 29), Array(19), Array(25, 21,
29, 30, 34, 35, 38), Array(24, 27, 33, 34, 35, 37), Array(8, 18, 15), Array(18, 25), Array(0, 3, 6, 1), Array(24, 21, 8, 18,
25, 30), Array(21, 24, 29, 32, 33), Array(19, 33, 34, 25, 35, 36), Array(30, 20, 31), Array(31, 30, 24, 25, 21, 34, 35), Array(
33, 24, 25, 35), Array(25, 24, 34, 33, 36, 38), Array(37, 35, 38), Array(36, 25), Array(36, 35, 34, 24, 39, 41), Array(38, 19,
40), Array(39, 38), Array(38), Array());
Global.DistanceMatrix = Array(Array(9999, 2, 2, 1, 2, 2, 1, 1, 2, 2, 2, 3, 4, 5, 3, 4, 4, 3, 4, 7, 6, 4, 7, 8, 4, 4, 3, 3, 1, 3, 4,
6, 5, 5, 5, 5, 6, 5, 5, 6, 7, 6), Array(5, 9999, 3, 3, 2, 1, 2, 4, 1, 3, 2, 4, 5, 6, 4, 3, 4, 3, 2, 5, 5, 3, 6, 6, 3, 2, 2, 1,
6, 2, 3, 4, 4, 3, 3, 3, 4, 3, 4, 5, 6, 5), Array(3, 3, 9999, 1, 2, 2, 1, 2, 2, 1, 1, 2, 3, 4, 2, 3, 3, 2, 4, 7, 6, 4, 7, 8, 4,
4, 3, 4, 4, 3, 4, 6, 5, 5, 5, 5, 6, 5, 5, 6, 7, 6), Array(2, 3, 1, 9999, 1, 2, 1, 1, 2, 1, 1, 2, 3, 4, 2, 3, 3, 2, 4, 7, 6, 4,
7, 8, 4, 4, 3, 4, 3, 3, 4, 6, 5, 5, 5, 5, 6, 5, 5, 6, 7, 6), Array(3, 2, 2, 1, 9999, 1, 2, 2, 3, 2, 2, 3, 4, 5, 3, 4, 4, 3, 4,
7, 7, 5, 8, 8, 5, 4, 4, 3, 4, 4, 5, 6, 6, 5, 5, 5, 6, 5, 6, 7, 8, 7), Array(4, 1, 2, 2, 1, 9999, 1, 3, 2, 2, 2, 3, 4, 5, 3, 4,
4, 3, 3, 6, 6, 4, 7, 7, 4, 3, 3, 2, 5, 3, 4, 5, 5, 4, 4, 4, 5, 4, 5, 6, 7, 6), Array(3, 2, 1, 1, 2, 1, 9999, 2, 1, 1, 1, 2, 3,
4, 2, 3, 3, 2, 3, 6, 5, 3, 6, 7, 3, 3, 2, 3, 4, 2, 3, 5, 4, 4, 4, 4, 5, 4, 4, 5, 6, 5), Array(1, 3, 2, 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, 1, 1, 2, 9999,
1, 2, 1), Array(8, 5, 6, 6, 7, 6, 5, 7, 4, 6, 5, 7, 8, 9, 7, 5, 6, 6, 4, 1, 5, 3, 6, 2, 2, 3, 5, 4, 9, 3, 3, 2, 4, 3, 2, 2, 2,
3, 1, 9999, 1, 2), Array(8, 5, 6, 6, 7, 6, 5, 7, 4, 6, 5, 7, 8, 9, 7, 5, 6, 6, 4, 2, 5, 3, 6, 3, 2, 3, 5, 4, 9, 3, 3, 3, 4, 3,
2, 2, 2, 3, 1, 1, 9999, 2), Array(8, 5, 6, 6, 7, 6, 5, 7, 4, 6, 5, 7, 8, 9, 7, 5, 6, 6, 4, 3, 5, 3, 6, 4, 2, 3, 5, 4, 9, 3, 3,
4, 4, 3, 2, 2, 2, 3, 1, 2, 3, 9999), Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9999));
}
}
rule("BOT: PATH FINDING - START")
{
event
{
Ongoing - Each Player;
Team 2;
All;
}
conditions
{
Is Dummy Bot(Event Player) == True;
Has Spawned(Event Player) == True;
(Event Player.BotTargetPosition != -1 || Event Player.BotTargetPlayer != -1) == True;
}
actions
{
"GET CLOSSEST NODE ID NEAR BOT TO START PATH FINDING"
Call Subroutine(BotGetCurrentNodeId);
"GET CLOSSEST NODE ID NEAR TARGET POSITION"
Call Subroutine(BotGetTargetNodeId);
"SET MOVEMENT DIRECTION"
Start Throttle In Direction(Event Player, Direction Towards(Position Of(Event Player),
Global.NodePositions[Event Player.BotPathCurrentNodeId]), 1, To World, Replace existing throttle, Direction and Magnitude);
disabled Start Facing(Event Player, Direction Towards(Eye Position(Event Player), Global.NodePositions[Event Player.BotPathCurrentNodeId]),
500, To World, Direction and Turn Rate);
Event Player.BotIsPathFinding = True;
}
}
rule("BOT: PATH FINDING - REACHED THE NODE")
{
event
{
Ongoing - Each Player;
Team 2;
All;
}
conditions
{
Is Dummy Bot(Event Player) == True;
Has Spawned(Event Player) == True;
Event Player.BotIsPathFinding == True;
(Event Player.BotTargetNodeId >= 0 && Distance Between(Position Of(Event Player),
Global.NodePositions[Event Player.BotPathCurrentNodeId]) < 0.850) == True;
}
actions
{
Call Subroutine(BotGetTargetNodeId);
"BOT REACHED THE TARGET NODE"
If(Event Player.BotPathCurrentNodeId == Event Player.BotTargetNodeId);
Call Subroutine(BotResetPathFinding);
Abort;
End;
Call Subroutine(BotGetNextNodeId);
disabled Start Throttle In Direction(Event Player, Direction Towards(Position Of(Event Player),
Global.NodePositions[Event Player.BotPathCurrentNodeId]), 1, To World, Replace existing throttle, Direction and Magnitude);
disabled Start Facing(Event Player, Direction Towards(Eye Position(Event Player), Global.NodePositions[Event Player.BotPathCurrentNodeId]),
500, To World, Direction and Turn Rate);
}
}
rule("BOT: PATH FINDING - LOST THE CURRENT NODE")
{
event
{
Ongoing - Each Player;
Team 2;
All;
}
conditions
{
Is Dummy Bot(Event Player) == True;
Has Spawned(Event Player) == True;
Event Player.BotIsPathFinding == True;
(Is In Line of Sight(Position Of(Event Player) + Vector(0, 1.600, 0),
Global.NodePositions[Event Player.BotPathCurrentNodeId] + Vector(0, 2.500, 0), Barriers Do Not Block LOS)
== False && Speed Of In Direction(Event Player, Throttle Of(Event Player)) < 2) == True;
}
actions
{
Wait(0.500, Abort When False);
Call Subroutine(BotGetCurrentNodeId);
Start Throttle In Direction(Event Player, Direction Towards(Position Of(Event Player),
Global.NodePositions[Event Player.BotPathCurrentNodeId]), 1, To World, Replace existing throttle, Direction and Magnitude);
Start Facing(Event Player, Direction Towards(Eye Position(Event Player), Global.NodePositions[Event Player.BotPathCurrentNodeId]),
500, To World, Direction and Turn Rate);
}
}
rule("SUBROUTINE: BOT - START PATH FINDING")
{
event
{
Subroutine;
BotStartPathFinding;
}
actions
{
Abort If(Event Player.BotIsPathFinding == True);
"GET CLOSSEST NODE ID NEAR BOT TO START PATH FINDING"
Call Subroutine(BotGetCurrentNodeId);
"GET CLOSSEST NODE ID NEAR TARGET POSITION"
Call Subroutine(BotGetTargetNodeId);
"SET MOVEMENT DIRECTION"
Start Throttle In Direction(Event Player, Direction Towards(Position Of(Event Player),
Global.NodePositions[Event Player.BotPathCurrentNodeId]), 1, To World, Replace existing throttle, Direction and Magnitude);
disabled Start Facing(Event Player, Direction Towards(Eye Position(Event Player), Global.NodePositions[Event Player.BotPathCurrentNodeId]),
500, To World, Direction and Turn Rate);
Event Player.BotIsPathFinding = True;
}
}
rule("SUBROUTINE: BOT - RESET PATH FINDING")
{
event
{
Subroutine;
BotResetPathFinding;
}
actions
{
Event Player.BotTargetPlayer = -1;
Event Player.BotTargetNodeId = -1;
Event Player.BotTargetPosition = -1;
Event Player.BotIsPathFinding = False;
Stop Facing(Event Player);
Stop Throttle In Direction(Event Player);
}
}
rule("SUBROUTINE: BOT - GET NEXT NODE ID")
{
event
{
Subroutine;
BotGetNextNodeId;
}
actions
{
Event Player.BotShortestDistance = 999;
Event Player.BotCurrentDistance = Event Player.BotShortestDistance;
Event Player.BotTempArray = Global.NodeConnections[Event Player.BotPathCurrentNodeId];
For Player Variable(Event Player, BotLoopIterator1, 0, Count Of(Event Player.BotTempArray), 1);
If(Event Player.BotTempArray[Event Player.BotLoopIterator1] == Event Player.BotTargetNodeId);
Event Player.BotPathCurrentNodeId = Event Player.BotTargetNodeId;
Break;
End;
Event Player.BotCurrentDistance = Global.DistanceMatrix[Event Player.BotTempArray[Event Player.BotLoopIterator1]][Event Player.BotTargetNodeId];
If(Event Player.BotCurrentDistance < Event Player.BotShortestDistance);
Event Player.BotShortestDistance = Event Player.BotCurrentDistance;
Event Player.BotPathCurrentNodeId = Event Player.BotTempArray[Event Player.BotLoopIterator1];
End;
End;
}
}
rule("SUBROUTINE: BOT - GET TARGET NODE ID")
{
event
{
Subroutine;
BotGetTargetNodeId;
}
actions
{
Event Player.BotTargetPosition = Event Player.BotTargetPlayer != -1 ? Position Of(Event Player.BotTargetPlayer)
: Event Player.BotTargetPosition;
Event Player.BotTargetNodeId = Index Of Array Value(Global.NodePositions, Sorted Array(Filtered Array(Global.NodePositions,
Is In Line of Sight(Event Player.BotTargetPosition + Vector(0, 2, 0), Current Array Element, Barriers Do Not Block LOS)
== True), Distance Between(Event Player.BotTargetPosition, Current Array Element))[0]);
}
}
rule("SUBROUTINE: BOT - GET CURRENT NODE ID")
{
event
{
Subroutine;
BotGetCurrentNodeId;
}
actions
{
Event Player.BotPathCurrentNodeId = Index Of Array Value(Global.NodePositions, Sorted Array(Filtered Array(Global.NodePositions,
Is In Line of Sight(Position Of(Event Player) + Vector(0, 2, 0), Current Array Element, Barriers Do Not Block LOS) == True),
Distance Between(Position Of(Event Player), Current Array Element))[0]);
}
}
disabled rule("=== PATH BUILDER MODE IMPORT ===")
{
event
{
Ongoing - Global;
}
}
disabled rule("=== GAME PHASES ===")
{
event
{
Ongoing - Global;
}
}
rule("GLOBAL: ASEMBLING PHASE")
{
event
{
Ongoing - Global;
}
conditions
{
Is Assembling Heroes == True;
}
actions
{
If(Global.IsDebug);
Set Match Time(1);
Else;
Disable Inspector Recording;
Set Match Time(20);
End;
Disable Game Mode HUD(All Players(All Teams));
Disable Game Mode In-World UI(All Players(All Teams));
}
}
rule("GLOBAL: SETUP PHASE")
{
event
{
Ongoing - Global;
}
conditions
{
Is In Setup == True;
}
actions
{
If(Global.IsDebug);
Set Match Time(1);
Else;
Set Match Time(20);
End;
Set Objective Description(All Players(All Teams), Custom String("DEFEND GATE"), Visible To and String);
}
}
rule("GLOBAL: GAME IN PROGRESS")
{
event
{
Ongoing - Global;
}
conditions
{
Is Game In Progress == True;
}
actions
{
Set Match Time(3599);
Disable Built-In Game Mode Scoring;
Disable Built-In Game Mode Announcer;
Disable Built-In Game Mode Completion;
Disable Game Mode HUD(All Players(All Teams));
Global.GateHealth = Global.GateMaxHealth;
Global.GateHealthChase = Global.GateHealth;
Global.GateProgressBarColorComponent = 255;
Global.GateProgressBarColorCurrent = Color(White);
Create Progress Bar HUD Text(All Players(Team 1), Global.GateHealthChase * 100 / Global.GateMaxHealth, Custom String(
"GATE {0}/{1}", Global.GateHealth, Global.GateMaxHealth), Top, 1, Global.GateProgressBarColorCurrent, Color(White),
Visible To Values and Color, Default Visibility);
Create HUD Text(All Players(Team 1), Null, Null, Custom String("SURVIVED TIME: {0}:{1}", Global.TimeMin,
Global.TimeSec < 10 ? Custom String("0{0}", Global.TimeSec) : Global.TimeSec), Top, 2, Color(White), Color(White), Color(
White), Visible To and String, Default Visibility);
"CREATE BOTS"
For Global Variable(LoopIterator1, 0, 8, 1);
Create Dummy Bot(Global.BotsArrayOrder[Global.BotsArrayOrderCurrentId], Team 2, -1, Vector(0, 999, 0), Vector(0, 0, 0));
Wait(0.600, Ignore Condition);
End;
}
}
disabled rule("=== GAME - MAIN LOGIC ===")
{
event
{
Ongoing - Global;
}
}
rule("GLOBAL: DEFEAT")
{
event
{
Ongoing - Global;
}
conditions
{
Is Game In Progress == True;
Global.IsDebug == False;
Global.GateHealth <= 0;
}
actions
{
Declare Team Victory(Team 2);
}
}
rule("GLOBAL: TIMER")
{
event
{
Ongoing - Global;
}
conditions
{
Is Game In Progress == True;
disabled Global.GateHealth > 0;
}
actions
{
Wait(1, Ignore Condition);
Global.TimeSec += 1;
If(Global.TimeSec == 60);
Global.TimeSec = 0;
Global.TimeMin += 1;
Global.SpawnPositionMaxId += 1;
Start Rule(AddNextHeroInGame, Restart Rule);
Else If(Global.TimeSec == 30);
Global.SpawnPositionMaxId += 1;
End;
Loop If Condition Is True;
}
}
rule("SUBROUTINE: GAME LOGIC")
{
event
{
Subroutine;
AddNextHeroInGame;
}
actions
{
"REDUCE RESPAWN TIME FOR ZENS"
Global.ZenRespawnTime -= 1.500;
Global.ZenRespawnTime = Max(1, Global.ZenRespawnTime);
Set Respawn Max Time(Filtered Array(All Players(Team 2), Hero Of(Current Array Element) == Global.BotsArrayOrder[0]),
Global.ZenRespawnTime);
"ALL HEROES WAS ADDED IN GAME"
Abort If(Global.BotsArrayOrderCurrentId == Count Of(Global.BotsArrayOrder) - 1);
Global.BotsArrayOrderCurrentId += 1;
"ABORT IF NEXT HERO IN ARRAY ORDER IS NULL"
Abort If(Global.BotsArrayOrder[Global.BotsArrayOrderCurrentId] == Null);
"WAITING FOR ANY DEAD BOT"
Wait Until(Is True For Any(All Players(Team 2), Is Dead(Current Array Element) && Hero Of(Current Array Element)
== Global.BotsArrayOrder[0]), 99999);
"REPLACE HIM TO A NEW HERO"
Global.CurrentBot = Filtered Array(All Players(Team 2), Is Dead(Current Array Element) && Hero Of(Current Array Element)
== Global.BotsArrayOrder[0])[0];
Destroy Dummy Bot(Team 2, Slot Of(Global.CurrentBot));
Wait(0.050, Ignore Condition);
Create Dummy Bot(Global.BotsArrayOrder[Global.BotsArrayOrderCurrentId], Team 2, -1, Vector(0, 999, 0), Vector(0, 0, 0));
}
}
- disabled rule("=== ECHO ===")
- {
- event
- {
- Ongoing - Global;
- }
- }
- rule("BOT: ECHO - FLY ABILITY")
- {
- event
- {
- Ongoing - Each Player;
- Team 2;
- Echo;
- }
- conditions
- {
- Is Dummy Bot(Event Player) == True;
- Has Spawned(Event Player) == True;
- Is Alive(Event Player) == True;
- Event Player.IsRespawning == False;
- Event Player.BotIsPathFinding == False;
- Is Using Ability 1(Event Player) == False;
- }
- actions
- {
- Set Ability Cooldown(Event Player, Button(Ability 1), 0);
- Press Button(Event Player, Button(Ability 1));
- Wait(0.300, Ignore Condition);
- Loop If Condition Is True;
- }
- }
- rule("BOT: ECHO - BEAM ABILITY")
- {
- event
- {
- Ongoing - Each Player;
- Team 2;
- Echo;
- }
- conditions
- {
- Is Dummy Bot(Event Player) == True;
- Has Spawned(Event Player) == True;
- Is Alive(Event Player) == True;
- Event Player.IsRespawning == False;
- Is Using Ability 1(Event Player) == False;
- Event Player.BotDoesUniqueBehaviour == True;
- }
- actions
- {
- Set Ability Cooldown(Event Player, Button(Ability 2), 0);
- Press Button(Event Player, Button(Ability 2));
- }
- }
- rule("BOT: ECHO - BAD STATUS - RESET BEAM")
- {
- event
- {
- Ongoing - Each Player;
- Team 2;
- Echo;
- }
- conditions
- {
- Is Dummy Bot(Event Player) == True;
- Has Spawned(Event Player) == True;
- Is Alive(Event Player) == True;
- Event Player.IsRespawning == False;
- (Has Status(Event Player, Hacked) || Has Status(Event Player, Frozen) || Has Status(Event Player, Knocked Down) || Has Status(
- Event Player, Asleep) || Has Status(Event Player, Stunned)) == True;
- }
- actions
- {
- Event Player.HasBadStatus = True;
- If(Event Player.BotDoesUniqueBehaviour);
- Call Subroutine(BotEchoDetachPlayer);
- End;
- Wait Until(!Has Status(Event Player, Knocked Down) && !Has Status(Event Player, Asleep) && !Has Status(Event Player, Frozen)
- && !Has Status(Event Player, Stunned), 5);
- Event Player.HasBadStatus = False;
- }
- }
- rule("BOT: ECHO - CAN'T SEE PORTAL - APPLY IMPULSE")
- {
- event
- {
- Ongoing - Each Player;
- Team 2;
- Echo;
- }
- conditions
- {
- Is Dummy Bot(Event Player) == True;
- Has Spawned(Event Player) == True;
- Is Alive(Event Player) == True;
- Event Player.IsRespawning == False;
- Event Player.BotDoesUniqueBehaviour == True;
- Is In Line of Sight(Position Of(Event Player), Global.BotEchoRespawnPosition, Barriers Do Not Block LOS) == False;
- }
- actions
- {
- Wait(0.300, Abort When False);
- Apply Impulse(Event Player, Up, 20, To World, Incorporate Contrary Motion);
- Wait(1, Ignore Condition);
- If(!Is In Line of Sight(Position Of(Event Player), Global.BotEchoRespawnPosition, Barriers Do Not Block LOS));
- Event Player.BotTargetPosition = Global.BotEchoRespawnPosition;
- Start Rule(BotStartPathFinding, Restart Rule);
- Else;
- Call Subroutine(BotResetPathFinding);
- End;
- Loop If Condition Is True;
- }
- }
- disabled rule("BOT: ECHO - MAIN LOGIC - BACKUP")
- {
- event
- {
- Ongoing - Each Player;
- Team 2;
- Echo;
- }
- conditions
- {
- Is Dummy Bot(Event Player) == True;
- Has Spawned(Event Player) == True;
- Is Alive(Event Player) == True;
- Event Player.IsRespawning == False;
- }
- actions
- {
- If(!Event Player.BotIsPathFinding);
- Event Player.BotSeePlayer = Sorted Array(Filtered Array(All Living Players(Team 1), Is In Line of Sight(Eye Position(Event Player),
- Eye Position(Current Array Element), Barriers Do Not Block LOS) == True), Distance Between(Position Of(Event Player),
- Position Of(Current Array Element)))[0];
- End;
- "NO PLAYERS IN VIEW RANGE"
- disabled If(Event Player.BotSeePlayer == Null);
- disabled Stop Throttle In Direction(Event Player);
- disabled End;
- "FLY TO PLAYER"
- If(Event Player.BotSeePlayer != Null && Distance Between(Position Of(Event Player), Position Of(Event Player.BotSeePlayer))
- > 4 && Event Player.BotDoesUniqueBehaviour == False);
- Event Player.BotTargetPlayer = Event Player.BotSeePlayer;
- Start Facing(Event Player, Direction Towards(Eye Position(Event Player), Eye Position(Event Player.BotSeePlayer)), 300, To World,
- Direction and Turn Rate);
- Start Throttle In Direction(Event Player, Direction Towards(Eye Position(Event Player), Eye Position(Event Player.BotSeePlayer)),
- 1, To World, Replace existing throttle, Direction and Magnitude);
- Start Holding Button(Event Player, Button(Jump));
- "ACTIVATE FOCUS BEAM"
- Else If(Event Player.BotSeePlayer != Null && Distance Between(Position Of(Event Player), Position Of(Event Player.BotSeePlayer))
- < 4 && Event Player.BotDoesUniqueBehaviour == False && Event Player.HasBadStatus == False);
- Event Player.BotDoesUniqueBehaviour = True;
- Set Status(Event Player.BotSeePlayer, Event Player, Stunned, 1);
- Set Status(Event Player.BotSeePlayer, Event Player, Hacked, 99999);
- Attach Players(Event Player.BotSeePlayer, Event Player, Vector(0, 0, 2));
- Press Button(Event Player, Button(Ability 2));
- "TELEPORT PLAYER TO AWAY"
- Else If(Event Player.BotDoesUniqueBehaviour && Distance Between(Position Of(Event Player.BotSeePlayer),
- Global.BotEchoRespawnPosition) < 4);
- Play Effect(All Players(All Teams), Bad Pickup Effect, Color(White), Global.BotEchoRespawnPosition, 1);
- Teleport(Event Player.BotSeePlayer, Random Value In Array(Global.BotEchoTeleportPositions));
- Set Status(Event Player.BotSeePlayer, Event Player, Knocked Down, 1);
- Call Subroutine(BotEchoDetachPlayer);
- "BEGIN TO FLY TO THE PORTAL"
- Else If(Event Player.BotDoesUniqueBehaviour == True);
- Start Facing(Event Player, Direction Towards(Eye Position(Event Player), Global.BotEchoRespawnPosition), 100, To World,
- Direction and Turn Rate);
- "BOT SEES THE PORTAL"
- If(Is In Line of Sight(Position Of(Event Player), Global.BotEchoRespawnPosition, Barriers Do Not Block LOS));
- "RESET PATH FINDING"
- If(Event Player.BotIsPathFinding);
- Call Subroutine(BotResetPathFinding);
- End;
- Start Throttle In Direction(Event Player, Direction Towards(Eye Position(Event Player), Global.BotEchoRespawnPosition), 1,
- To World, Replace existing throttle, Direction and Magnitude);
- "BOT DOES NOT SEE THE PORTAL"
- Else If(!Event Player.BotIsPathFinding);
- Event Player.BotTargetPlayer = Event Player.BotSeePlayer;
- Stop Holding Button(Event Player, Button(Jump));
- Start Rule(BotStartPathFinding, Restart Rule);
- End;
- End;
- Wait(0.500, Ignore Condition);
- Loop If Condition Is True;
- }
- }
- rule("BOT: ECHO - MAIN LOGIC - LOOP")
- {
- event
- {
- Ongoing - Each Player;
- Team 2;
- Echo;
- }
- conditions
- {
- Is Dummy Bot(Event Player) == True;
- Has Spawned(Event Player) == True;
- Is Alive(Event Player) == True;
- Event Player.IsRespawning == False;
- }
- actions
- {
Event Player.BotSeePlayer = Sorted Array(Filtered Array(All Living Players(Team 1), Is In Line of Sight(Eye Position(Event Player),
Eye Position(Current Array Element), Barriers Do Not Block LOS) == True), Distance Between(Position Of(Event Player),
Position Of(Current Array Element)))[0];
- If(Event Player.BotDoesUniqueBehaviour == False);
- Event Player.BotSeePlayer = Sorted Array(Filtered Array(All Living Players(Team 1), Has Spawned(Current Array Element)
- == True && Is In Line of Sight(Eye Position(Event Player), Eye Position(Current Array Element), Barriers Do Not Block LOS)
- == True), Distance Between(Position Of(Event Player), Position Of(Current Array Element)))[0];
- End;
- "TELEPORT PLAYER SO FAR"
If(Event Player.BotDoesUniqueBehaviour && Distance Between(Position Of(Event Player.BotSeePlayer), Global.BotEchoRespawnPosition)
< 4);
- If(Event Player.BotDoesUniqueBehaviour && Distance Between(Position Of(Event Player.BotEchoCapturedPlayer),
- Global.BotEchoRespawnPosition) < 4);
- Play Effect(All Players(All Teams), Bad Pickup Effect, Color(White), Global.BotEchoRespawnPosition, 1);
Teleport(Event Player.BotSeePlayer, Random Value In Array(Global.BotEchoTeleportPositions));
Set Status(Event Player.BotSeePlayer, Event Player, Knocked Down, 1);
- Teleport(Event Player.BotEchoCapturedPlayer, Random Value In Array(Global.BotEchoTeleportPositions));
- Set Status(Event Player.BotEchoCapturedPlayer, Event Player, Knocked Down, 1);
- Call Subroutine(BotEchoDetachPlayer);
- End;
- "BEGIN TO FLY TO THE PORTAL WITH A PLAYER"
- If(Event Player.BotDoesUniqueBehaviour);
- Start Facing(Event Player, Direction Towards(Eye Position(Event Player), Global.BotEchoRespawnPosition), 100, To World,
- Direction and Turn Rate);
- "BOT SEES THE PORTAL"
- If(Is In Line of Sight(Position Of(Event Player), Global.BotEchoRespawnPosition, Barriers Do Not Block LOS));
- "RESET PATH FINDING"
- If(Event Player.BotIsPathFinding);
- Call Subroutine(BotResetPathFinding);
- End;
- Start Throttle In Direction(Event Player, Direction Towards(Eye Position(Event Player), Global.BotEchoRespawnPosition), 1,
- To World, Replace existing throttle, Direction and Magnitude);
- "BOT DOES NOT SEE THE PORTAL"
- Else If(!Event Player.BotIsPathFinding);
Event Player.BotTargetPlayer = Event Player.BotSeePlayer;
- Event Player.BotTargetPlayer = Event Player.BotEchoCapturedPlayer;
- Stop Holding Button(Event Player, Button(Jump));
- Start Rule(BotStartPathFinding, Restart Rule);
- End;
- End;
- Wait(0.500, Ignore Condition);
- Loop If Condition Is True;
- }
- }
- rule("BOT: ECHO - DEFEND PORTAL")
- {
- event
- {
- Ongoing - Each Player;
- Team 2;
- Echo;
- }
- conditions
- {
- Is Dummy Bot(Event Player) == True;
- Has Spawned(Event Player) == True;
- Is Alive(Event Player) == True;
- Event Player.BotSeePlayer == Null;
- Event Player.IsRespawning == False;
- Event Player.BotIsPathFinding == False;
- Event Player.BotDoesUniqueBehaviour == False;
- }
- actions
- {
- Call Subroutine(BotEchoFlyToPortal);
- }
- }
- rule("BOT: ECHO - CAN SEE PLAYER")
- {
- event
- {
- Ongoing - Each Player;
- Team 2;
- Echo;
- }
- conditions
- {
- Is Dummy Bot(Event Player) == True;
- Has Spawned(Event Player) == True;
- Is Alive(Event Player) == True;
- Event Player.BotSeePlayer != Null;
- Event Player.IsRespawning == False;
- Event Player.BotDoesUniqueBehaviour == False;
- Is In Line of Sight(Eye Position(Event Player), Eye Position(Event Player.BotSeePlayer), Barriers Do Not Block LOS) == True;
- }
- actions
- {
- If(Event Player.BotIsPathFinding);
- Call Subroutine(BotResetPathFinding);
- End;
- Call Subroutine(BotEchoFlyToPlayer);
- }
- }
- rule("BOT: ECHO - PATH FINDING TO PLAYER")
- {
- event
- {
- Ongoing - Each Player;
- Team 2;
- Echo;
- }
- conditions
- {
- Is Dummy Bot(Event Player) == True;
- Has Spawned(Event Player) == True;
- Is Alive(Event Player) == True;
- Event Player.BotSeePlayer != Null;
- Event Player.IsRespawning == False;
- Event Player.BotIsPathFinding == False;
- Event Player.BotDoesUniqueBehaviour == False;
- Is In Line of Sight(Eye Position(Event Player), Eye Position(Event Player.BotSeePlayer), Barriers Do Not Block LOS) == False;
- }
- actions
- {
- Event Player.BotTargetPlayer = Event Player.BotSeePlayer;
- Stop Holding Button(Event Player, Button(Jump));
- Call Subroutine(BotStartPathFinding);
- }
- }
- rule("BOT: ECHO - ATTACH PLAYER BY BEAM")
- {
- event
- {
- Ongoing - Each Player;
- Team 2;
- Echo;
- }
- conditions
- {
- Is Dummy Bot(Event Player) == True;
- Has Spawned(Event Player) == True;
- Is Alive(Event Player) == True;
- Event Player.BotSeePlayer != Null;
- Event Player.IsRespawning == False;
- Event Player.BotEchoCapturedPlayer == Null;
- Event Player.BotDoesUniqueBehaviour == False;
- Is In Line of Sight(Eye Position(Event Player), Eye Position(Event Player.BotSeePlayer), Barriers Do Not Block LOS) == True;
- Distance Between(Position Of(Event Player), Position Of(Event Player.BotSeePlayer)) < 3;
- }
- actions
- {
- Event Player.BotDoesUniqueBehaviour = True;
Set Status(Event Player.BotSeePlayer, Event Player, Stunned, 1);
Set Status(Event Player.BotSeePlayer, Event Player, Hacked, 99999);
Attach Players(Event Player.BotSeePlayer, Event Player, Vector(0, 0, 2));
- Event Player.BotEchoCapturedPlayer = Event Player.BotSeePlayer;
- Set Status(Event Player.BotEchoCapturedPlayer, Event Player, Stunned, 0.700);
- Set Status(Event Player.BotEchoCapturedPlayer, Event Player, Hacked, 10);
- Attach Players(Event Player.BotEchoCapturedPlayer, Event Player, Vector(0, 0, 2));
- Press Button(Event Player, Button(Ability 2));
- }
- }
- rule("BOT: ECHO - PLAYER DEAD")
- {
- event
- {
- Ongoing - Each Player;
- Team 2;
- Echo;
- }
- conditions
- {
- Is Dummy Bot(Event Player) == True;
- Has Spawned(Event Player) == True;
- Is Alive(Event Player) == True;
- Event Player.IsRespawning == False;
Is Dead(Event Player.BotSeePlayer) == True;
- Is Dead(Event Player.BotEchoCapturedPlayer) != Null;
- }
- actions
- {
- If(Event Player.BotDoesUniqueBehaviour);
- Call Subroutine(BotEchoDetachPlayer);
- End;
Event Player.BotSeePlayer = Null;
- If(Event Player.BotIsPathFinding);
- Call Subroutine(BotResetPathFinding);
- End;
- Call Subroutine(BotEchoFlyToPortal);
- }
- }
- rule("SUBROUTINE: BOT - ECHO RESPAWN")
- {
- event
- {
- Subroutine;
- BotEchoRespawn;
- }
- actions
- {
- Event Player.BotCounter = 0;
- Event Player.BotEffects = Empty Array;
Create Effect(All Players(Team 1), Good Aura, Color(Sky Blue), Global.BotEchoRespawnPosition, Event Player.BotCounter,
- Create Effect(All Players(All Teams), Good Aura, Color(Sky Blue), Global.BotEchoRespawnPosition, Event Player.BotCounter,
- Visible To Position and Radius);
- Modify Player Variable(Event Player, BotEffects, Append To Array, Last Created Entity);
Create Effect(All Players(Team 1), Bad Aura, Color(Sky Blue), Global.BotEchoRespawnPosition, Event Player.BotCounter,
- Create Effect(All Players(All Teams), Bad Aura, Color(Sky Blue), Global.BotEchoRespawnPosition, Event Player.BotCounter,
- Visible To Position and Radius);
- Modify Player Variable(Event Player, BotEffects, Append To Array, Last Created Entity);
- Create Effect(All Players(All Teams), Energy Sound, Color(White), Global.BotEchoRespawnPosition, 200, Visible To);
- Modify Player Variable(Event Player, BotEffects, Append To Array, Last Created Entity);
- Chase Player Variable Over Time(Event Player, BotCounter, 3, 0.800, Destination and Duration);
- Play Effect(All Players(All Teams), Ring Explosion, Color(Sky Blue), Global.BotEchoRespawnPosition, 12);
- Play Effect(All Players(All Teams), Debuff Impact Sound, Null, Global.BotEchoRespawnPosition, 100);
- Wait(3, Ignore Condition);
- Set Gravity(Event Player, 40);
Set Move Speed(Event Player, 150);
Set Max Health(Event Player, 100 + Count Of(All Players(Team 1)) * 50);
- Set Move Speed(Event Player, 140);
- Set Max Health(Event Player, 100 + Count Of(All Players(Team 1)) * 25);
- Set Respawn Max Time(Event Player, 18);
- Teleport(Event Player, Global.BotEchoRespawnPosition);
- Play Effect(All Players(All Teams), Good Explosion, Color(White), Global.BotEchoRespawnPosition, 2.500);
- Play Effect(All Players(All Teams), Debuff Impact Sound, Null, Global.BotEchoRespawnPosition, 100);
- }
- }
- rule("SUBROUTINE: BOT ECHO - FLY TO PLAYER")
- {
- event
- {
- Subroutine;
- BotEchoFlyToPlayer;
- }
- actions
- {
- Start Facing(Event Player, Direction Towards(Eye Position(Event Player), Eye Position(Event Player.BotSeePlayer)), 300, To World,
- Direction and Turn Rate);
- Start Throttle In Direction(Event Player, Direction Towards(Eye Position(Event Player), Eye Position(Event Player.BotSeePlayer)),
- 1, To World, Replace existing throttle, Direction and Magnitude);
- Start Holding Button(Event Player, Button(Jump));
- }
- }
- rule("SUBROUTINE: BOT ECHO - FLY TO PORTAL")
- {
- event
- {
- Subroutine;
- BotEchoFlyToPortal;
- }
- actions
- {
- Start Facing(Event Player, Direction Towards(Eye Position(Event Player), Global.BotEchoRespawnPosition), 100, To World,
- Direction and Turn Rate);
- Start Throttle In Direction(Event Player, Direction Towards(Eye Position(Event Player), Global.BotEchoRespawnPosition), 1,
- To World, Replace existing throttle, Direction and Magnitude);
- Start Holding Button(Event Player, Button(Jump));
- }
- }
- rule("SUBROUTINE: BOT ECHO - DETACH PLAYER")
- {
- event
- {
- Subroutine;
- BotEchoDetachPlayer;
- }
- actions
- {
Detach Players(Event Player.BotSeePlayer);
Clear Status(Event Player.BotSeePlayer, Hacked);
- Detach Players(Event Player.BotEchoCapturedPlayer);
- Clear Status(Event Player.BotEchoCapturedPlayer, Hacked);
- Event Player.BotDoesUniqueBehaviour = False;
Event Player.BotSeePlayer = Null;
- Event Player.BotEchoCapturedPlayer = Null;
- }
- }
- disabled rule("=== PATH BUILDER MODE IMPORT ===")
- {
- event
- {
- Ongoing - Global;
- }
- }
- rule("MAP: HAVANA")
- {
- event
- {
- Ongoing - Global;
- }
- conditions
- {
- Current Map == Map(Havana);
- }
- actions
- {
- Global.NodePositions = Array(Vector(126.542, 12.733, -63.277), Vector(113.402, 7.319, -57.302), Vector(147.588, 6.425, -46.749),
- Vector(136.181, 6.425, -57.159), Vector(130.189, 6.425, -63.781), Vector(123.305, 6.425, -57.983), Vector(125.678, 6.504,
- -46.633), Vector(146.311, 9.444, -61.382), Vector(114.485, 7.471, -46.699), Vector(138.743, 6.425, -32.974), Vector(126.498,
- 6.425, -39.920), Vector(148.529, 9.425, -28.549), Vector(134.970, 10.396, -27.167), Vector(124.572, 10.434, -34.300), Vector(
- 138.605, 5.359, -18.647), Vector(119.009, 2.331, -31.024), Vector(121.138, 5.228, -19.933), Vector(126.722, 6.425, -29.505),
- Vector(102.762, 3.157, -33.609), Vector(76.030, 7.418, -74.087), Vector(83.720, 9.425, -33.744), Vector(97.439, 7.238,
- -42.379), Vector(86.252, 12.416, -47.261), Vector(65.178, 11.425, -73.187), Vector(97.466, 7.269, -50.596), Vector(99.937,
- 2.983, -67.099), Vector(113.039, 7.424, -37.337), Vector(106.552, 0.149, -53.045), Vector(120.953, 13.171, -58.443), Vector(
- 106.179, 7.450, -46.143), Vector(90.086, 7.411, -44.653), Vector(78.752, 7.418, -62.140), Vector(82.124, 7.428, -44.229),
- Vector(90.675, 7.231, -51.234), Vector(85.717, 4.692, -63.446), Vector(90.830, 4.330, -70.697), Vector(95.569, 3.646, -79.682),
- Vector(102.425, 2.387, -72.817), Vector(81.443, 4.425, -81.648), Vector(70.743, 6.418, -81.495), Vector(69.738, 6.419,
- -96.344), Vector(78.682, 5.418, -96.160), Vector(153.887, 18.628, -22.387));
- Global.NodeConnections = Array(Array(7, 3, 6, 28), Array(5, 8, 27), Array(3, 9, 6, 10), Array(4, 7, 2, 6, 9, 10), Array(3, 5),
- Array(4, 6, 1), Array(5, 3, 8, 10, 9, 2), Array(3, 0), Array(1, 6, 10, 26, 29), Array(10, 11, 2, 6, 3, 14, 17), Array(6, 8, 9,
- 2, 3, 17), Array(9, 12), Array(11, 9, 13), Array(12, 10), Array(9, 16), Array(16, 18), Array(14, 15, 18), Array(9, 15), Array(
- 15, 21, 27), Array(23, 31, 39), Array(22, 32), Array(18, 24, 30, 29, 33), Array(20, 30, 21, 33, 29), Array(19), Array(25, 21,
- 29, 30, 34, 35, 38), Array(24, 27, 33, 34, 35, 37), Array(8, 18, 15), Array(18, 25), Array(0, 3, 6, 1), Array(24, 21, 8, 18,
- 25, 30), Array(21, 24, 29, 32, 33), Array(19, 33, 34, 25, 35, 36), Array(30, 20, 31), Array(31, 30, 24, 25, 21, 34, 35), Array(
- 33, 24, 25, 35), Array(25, 24, 34, 33, 36, 38), Array(37, 35, 38), Array(36, 25), Array(36, 35, 34, 24, 39, 41), Array(38, 19,
- 40), Array(39, 38), Array(38), Array());
- Global.DistanceMatrix = Array(Array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, 6, 6, 7, 6, 5, 7, 4, 6, 5, 7, 8, 9, 7, 5, 6, 6, 4, 1, 5, 3, 6, 2, 2, 3, 5, 4, 9, 3, 3, 2, 4, 3, 2, 2, 2,
- 3, 1, 9999, 1, 2), Array(8, 5, 6, 6, 7, 6, 5, 7, 4, 6, 5, 7, 8, 9, 7, 5, 6, 6, 4, 2, 5, 3, 6, 3, 2, 3, 5, 4, 9, 3, 3, 3, 4, 3,
- 2, 2, 2, 3, 1, 1, 9999, 2), Array(8, 5, 6, 6, 7, 6, 5, 7, 4, 6, 5, 7, 8, 9, 7, 5, 6, 6, 4, 3, 5, 3, 6, 4, 2, 3, 5, 4, 9, 3, 3,
- 4, 4, 3, 2, 2, 2, 3, 1, 2, 3, 9999), Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9999));
- }
- }
- rule("BOT: PATH FINDING - START")
- {
- event
- {
- Ongoing - Each Player;
- Team 2;
- All;
- }
- conditions
- {
- Is Dummy Bot(Event Player) == True;
- Has Spawned(Event Player) == True;
- (Event Player.BotTargetPosition != -1 || Event Player.BotTargetPlayer != -1) == True;
- }
- actions
- {
- "GET CLOSSEST NODE ID NEAR BOT TO START PATH FINDING"
- Call Subroutine(BotGetCurrentNodeId);
- "GET CLOSSEST NODE ID NEAR TARGET POSITION"
- Call Subroutine(BotGetTargetNodeId);
- "SET MOVEMENT DIRECTION"
- Start Throttle In Direction(Event Player, Direction Towards(Position Of(Event Player),
- Global.NodePositions[Event Player.BotPathCurrentNodeId]), 1, To World, Replace existing throttle, Direction and Magnitude);
- disabled Start Facing(Event Player, Direction Towards(Eye Position(Event Player), Global.NodePositions[Event Player.BotPathCurrentNodeId]),
- 500, To World, Direction and Turn Rate);
- Event Player.BotIsPathFinding = True;
- }
- }
- rule("BOT: PATH FINDING - REACHED THE NODE")
- {
- event
- {
- Ongoing - Each Player;
- Team 2;
- All;
- }
- conditions
- {
- Is Dummy Bot(Event Player) == True;
- Has Spawned(Event Player) == True;
- Event Player.BotIsPathFinding == True;
- (Event Player.BotTargetNodeId >= 0 && Distance Between(Position Of(Event Player),
- Global.NodePositions[Event Player.BotPathCurrentNodeId]) < 0.850) == True;
- }
- actions
- {
- Call Subroutine(BotGetTargetNodeId);
- "BOT REACHED THE TARGET NODE"
- If(Event Player.BotPathCurrentNodeId == Event Player.BotTargetNodeId);
- Call Subroutine(BotResetPathFinding);
- Abort;
- End;
- Call Subroutine(BotGetNextNodeId);
- disabled Start Throttle In Direction(Event Player, Direction Towards(Position Of(Event Player),
- Global.NodePositions[Event Player.BotPathCurrentNodeId]), 1, To World, Replace existing throttle, Direction and Magnitude);
- disabled Start Facing(Event Player, Direction Towards(Eye Position(Event Player), Global.NodePositions[Event Player.BotPathCurrentNodeId]),
- 500, To World, Direction and Turn Rate);
- }
- }
- rule("BOT: PATH FINDING - LOST THE CURRENT NODE")
- {
- event
- {
- Ongoing - Each Player;
- Team 2;
- All;
- }
- conditions
- {
- Is Dummy Bot(Event Player) == True;
- Has Spawned(Event Player) == True;
- Event Player.BotIsPathFinding == True;
- (Is In Line of Sight(Position Of(Event Player) + Vector(0, 1.600, 0),
- Global.NodePositions[Event Player.BotPathCurrentNodeId] + Vector(0, 2.500, 0), Barriers Do Not Block LOS)
- == False && Speed Of In Direction(Event Player, Throttle Of(Event Player)) < 2) == True;
- }
- actions
- {
- Wait(0.500, Abort When False);
- Call Subroutine(BotGetCurrentNodeId);
- Start Throttle In Direction(Event Player, Direction Towards(Position Of(Event Player),
- Global.NodePositions[Event Player.BotPathCurrentNodeId]), 1, To World, Replace existing throttle, Direction and Magnitude);
- Start Facing(Event Player, Direction Towards(Eye Position(Event Player), Global.NodePositions[Event Player.BotPathCurrentNodeId]),
- 500, To World, Direction and Turn Rate);
- }
- }
- rule("SUBROUTINE: BOT - START PATH FINDING")
- {
- event
- {
- Subroutine;
- BotStartPathFinding;
- }
- actions
- {
- Abort If(Event Player.BotIsPathFinding == True);
- "GET CLOSSEST NODE ID NEAR BOT TO START PATH FINDING"
- Call Subroutine(BotGetCurrentNodeId);
- "GET CLOSSEST NODE ID NEAR TARGET POSITION"
- Call Subroutine(BotGetTargetNodeId);
- "SET MOVEMENT DIRECTION"
- Start Throttle In Direction(Event Player, Direction Towards(Position Of(Event Player),
- Global.NodePositions[Event Player.BotPathCurrentNodeId]), 1, To World, Replace existing throttle, Direction and Magnitude);
- disabled Start Facing(Event Player, Direction Towards(Eye Position(Event Player), Global.NodePositions[Event Player.BotPathCurrentNodeId]),
- 500, To World, Direction and Turn Rate);
- Event Player.BotIsPathFinding = True;
- }
- }
- rule("SUBROUTINE: BOT - RESET PATH FINDING")
- {
- event
- {
- Subroutine;
- BotResetPathFinding;
- }
- actions
- {
- Event Player.BotTargetPlayer = -1;
- Event Player.BotTargetNodeId = -1;
- Event Player.BotTargetPosition = -1;
- Event Player.BotIsPathFinding = False;
- Stop Facing(Event Player);
- Stop Throttle In Direction(Event Player);
- }
- }
- rule("SUBROUTINE: BOT - GET NEXT NODE ID")
- {
- event
- {
- Subroutine;
- BotGetNextNodeId;
- }
- actions
- {
- Event Player.BotShortestDistance = 999;
- Event Player.BotCurrentDistance = Event Player.BotShortestDistance;
- Event Player.BotTempArray = Global.NodeConnections[Event Player.BotPathCurrentNodeId];
- For Player Variable(Event Player, BotLoopIterator1, 0, Count Of(Event Player.BotTempArray), 1);
- If(Event Player.BotTempArray[Event Player.BotLoopIterator1] == Event Player.BotTargetNodeId);
- Event Player.BotPathCurrentNodeId = Event Player.BotTargetNodeId;
- Break;
- End;
- Event Player.BotCurrentDistance = Global.DistanceMatrix[Event Player.BotTempArray[Event Player.BotLoopIterator1]][Event Player.BotTargetNodeId];
- If(Event Player.BotCurrentDistance < Event Player.BotShortestDistance);
- Event Player.BotShortestDistance = Event Player.BotCurrentDistance;
- Event Player.BotPathCurrentNodeId = Event Player.BotTempArray[Event Player.BotLoopIterator1];
- End;
- End;
- }
- }
- rule("SUBROUTINE: BOT - GET TARGET NODE ID")
- {
- event
- {
- Subroutine;
- BotGetTargetNodeId;
- }
- actions
- {
- Event Player.BotTargetPosition = Event Player.BotTargetPlayer != -1 ? Position Of(Event Player.BotTargetPlayer)
- : Event Player.BotTargetPosition;
- Event Player.BotTargetNodeId = Index Of Array Value(Global.NodePositions, Sorted Array(Filtered Array(Global.NodePositions,
- Is In Line of Sight(Event Player.BotTargetPosition + Vector(0, 2, 0), Current Array Element, Barriers Do Not Block LOS)
- == True), Distance Between(Event Player.BotTargetPosition, Current Array Element))[0]);
- }
- }
- rule("SUBROUTINE: BOT - GET CURRENT NODE ID")
- {
- event
- {
- Subroutine;
- BotGetCurrentNodeId;
- }
- actions
- {
- Event Player.BotPathCurrentNodeId = Index Of Array Value(Global.NodePositions, Sorted Array(Filtered Array(Global.NodePositions,
- Is In Line of Sight(Position Of(Event Player) + Vector(0, 2, 0), Current Array Element, Barriers Do Not Block LOS) == True),
- Distance Between(Position Of(Event Player), Current Array Element))[0]);
- }
- }
- disabled rule("=== PATH BUILDER MODE IMPORT ===")
- {
- event
- {
- Ongoing - Global;
- }
- }