Garry's Mod Wiki

NPC:GetLastTimeTookDamageFromEnemy

  number NPC:GetLastTimeTookDamageFromEnemy( Entity enemy = nil )

Description

Returns CurTime based time since this NPC last received damage from given enemy. The last damage time is set when NPC:MarkTookDamageFromEnemy is called.

Arguments

1 Entity enemy = nil
The enemy to test. Defaults to currently active enemy (NPC:GetEnemy)

Returns

1 number
Time since this NPC last received damage from given enemy.