Here is how you could recognize turret/B.O.B damage/hits. Import these settings to test it out. Turret/ B.O.B damage will be tracked when the game mode starts.
Notes:
I am unsure what the server load looks like when scaled to multiple players/bots.
You should not have multiple players with the ability to create Turrets/B.O.B.
settings
{
modes
{
Deathmatch
General
{
Game Mode Start: Immediately
Limit Roles: 1 Tank 2 Offense 2 Support
Score To Win: 5000
}
}
}
variables
{
global:
0: index
1: valueOfIndex
2: allPlayers
3: heroesWithEntities
player:
0: weaponDamageDealt
1: heroEntityDamageDealt
2: currentHealth
3: lastAttacker
5: damageDealt
6: lastDamageReceived
}
rule("[debug] createHUDValueTracking")
{
event
{
Ongoing - Each Player;
All;
All;
}
conditions
{
Is Game In Progress == True;
}
actions
{
Create HUD Text(Event Player, Custom String("Entity Damage Dealt {0}", Event Player.heroEntityDamageDealt), Custom String(
"Weapon Damage Dealt {0}", Event Player.weaponDamageDealt), Custom String(
"All Damage Dealt {0}. Player Stat All Damage Dealt {1}", Event Player.damageDealt, Player Stat(Event Player,
All Damage Dealt)), Top, 0, Color(White), Color(White), Color(White), String, Default Visibility);
}
}
rule("[debug] createBotForTesting")
{
event
{
Ongoing - Global;
}
conditions
{
Is Button Held(Host Player, Button(Interact)) == True;
Has Spawned(Host Player) == True;
}
actions
{
Create Dummy Bot(Hero(Reinhardt), All Teams, -1, Position Of(Host Player), Vector(0, 0, 0));
Set Ultimate Charge(Host Player, 100);
}
}
rule("[debug] Display Server Stats")
{
event
{
Ongoing - Each Player;
All;
All;
}
conditions
{
Is Game In Progress == True;
}
actions
{
Create HUD Text(Filtered Array(All Players(All Teams), !Is Dummy Bot(Event Player)), Custom String("Serve Load {0}", Server Load),
Custom String("Server Load Average {0}", Server Load Average), Custom String("Server Load Peak {0}", Server Load Peak), Right,
0, Color(White), Color(White), Color(White), String, Default Visibility);
}
}
rule("setGlobalVariables")
{
event
{
Ongoing - Global;
}
actions
{
Global.allPlayers = Filtered Array(All Players(All Teams), !Is Dummy Bot(Current Array Element));
Global.heroesWithEntities = Array(Hero(Ashe), Hero(Symmetra), Hero(Torbjörn));
}
}
rule("setPlayerVariables")
{
event
{
Ongoing - Each Player;
All;
All;
}
actions
{
Event Player.lastAttacker = Null;
}
}
rule("setPlayerCurrentHealth")
{
event
{
Ongoing - Each Player;
All;
All;
}
conditions
{
Has Spawned(Event Player) == True;
Is Dead(Event Player) == False;
}
actions
{
Event Player.currentHealth = Max Health(Event Player);
}
}
rule("updateAllPlayers")
{
event
{
Ongoing - Global;
}
conditions
{
Global.allPlayers != Filtered Array(All Players(All Teams), !Is Dummy Bot(Current Array Element));
}
actions
{
Global.allPlayers = Filtered Array(All Players(All Teams), !Is Dummy Bot(Current Array Element));
}
}
rule("rememberAttacker")
{
event
{
Player Took Damage;
All;
All;
}
actions
{
Event Player.lastAttacker = Attacker;
}
}
rule("onPlayerReceivedDamage")
{
event
{
Ongoing - Each Player;
All;
All;
}
conditions
{
Is Game In Progress == True;
Array Contains(Global.heroesWithEntities, Hero Of(Event Player)) == True;
Global.heroesWithEntities == 0;
}
actions
{
If(Health(Event Player) < Event Player.currentHealth);
Event Player.lastDamageReceived = Event Player.currentHealth - Health(Event Player);
Event Player.currentHealth = Health(Event Player);
If(Entity Exists(Event Player.lastAttacker) == True);
Event Player.lastAttacker.damageDealt += Event Player.lastDamageReceived;
Event Player.lastAttacker.weaponDamageDealt += Event Player.lastDamageReceived;
Event Player.lastAttacker = Null;
Else;
For Global Variable(index, 0, Count Of(Global.allPlayers), 1);
Global.valueOfIndex = Global.allPlayers[Global.index];
Global.valueOfIndex.damageDealt += Event Player.lastDamageReceived;
Global.valueOfIndex.heroEntityDamageDealt += Event Player.lastDamageReceived;
End;
End;
End;
Global.heroesWithEntities = 1;
Chase Global Variable Over Time(heroesWithEntities, 0, 0.032, None);
}
}