Garry's Mod Wiki

NPC:GetLastTimeTookDamageFromEnemy

  number NPC:GetLastTimeTookDamageFromEnemy( Entity enemy = nil )

Just Added

This was just added in the latest version (2022.06.08). It might only be available on the Dev Branch right now.

Description

Returns CurTime based time since this NPC last received damage from given enemy.

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.