Damage History#

After a player receives damage it is stored by the game in an array of the following struct. The information in that struct is final and changing it does not affect the game.


struct DamageHistoryStruct#
string attackerName#

Name of the attacker

string attackerPetName#

Name of the titan

vector origin#

Position of the victim

float damage#

The amount of damage inflicted

int damageType#

A value from the Damage Flags

int damageSourceId#

Damage souce ID from the gun ( damage-source-id-overview )

entity attacker#

Entity of the attacker

int attackerEHandle#
float attackerHealthPercent#

How much health the attacker has in %

float time#

When the damage was inflicted

array<string> weaponMods#

Array of mods on the attacking gun

bool victimIsTitan#

true if the victim died in the Titan

bool rodeoDamage#

true if the damage was inflicted in rodeo mode

Getting the info from the entity#

You can get the damage history for any player entity with player.e.recentDamageHistory, this is of the type array<DamageHistoryStruct> and gets automatically updated by the game. The higher the index the older the DamageHistoryStruct is ( so to get the most recent struct you do player.e.recentDamageHistory[ 0 ] ).

Getter functions#

array<DamageHistoryStruct> GetDamageEventsForTime(entity player, float time)#
  • entity player – The player you want the damage history from.

  • float time – How old the damage history can be in seconds.


All DamageHistoryStruct found in the given time frame.

Setter functions#

DamageHistoryStruct function StoreDamageHistoryAndUpdate( entity storeEnt, float maxTime, float damage, vector damageOrigin, int damageType, int damageSourceId, entity attacker = null, array<string> weaponMods = [] )
void function UpdateDamageHistory( entity player, float maxTime, float time )

Removes all DamageHistoryStruct in the time frame time - maxTime

  • entity player – The player you want to update the damage history from.

  • float maxTime – How old the damage history can maximally be

  • float time – How old the damage history can be in seconds.

Built in Checks#

float function GetLastDamageTime( entity player )
bool function WasRecentlyHitByEntity( entity player, entity ent, float hitTime )
bool function WasRecentlyHitForDamage( entity player, float damageAmount, float hitTime )
bool function WasRecentlyHitForDamageType( entity player, float damageType, float hitTime )
float function GetTotalDamageTaken( entity player )
float function GetTotalDamageTakenInTime( entity player, float hitTime )
array<entity> function GetTitansHitMeInTime( entity player, float hitTime )
float function GetTotalDamageTakenByPlayer( entity player, entity attacker )
array<AttackerDamage> function GetDamageSortedByAttacker( entity ent, float totalTime )
bool function WasRecentlyHitByDamageSourceId( entity player, int damageSourceId, float hitTime )
AssistingPlayerStruct function GetLatestAssistingPlayerInfo( entity ent )


struct AssistingPlayerStruct#
entity player#
int damageSourceId#
float assistTime#
array<DamageHistoryStruct> function GetRodeoAttacksByPlayer( entity player, entity attacker, float time )
string function GetLastDamageSourceStringForAttacker( entity victim, entity attacker )
float function TotalDamageOverTime_BlendedOut( entity soul, float start, float end )
void function ClearRecentDamageHistory( entity player )