Garry's Mod Wiki

NPC:GetTimeEnemyLastReacquired

  number NPC:GetTimeEnemyLastReacquired( 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 the enemy was reacquired, meaning it is currently in Line of Sight of the NPC.

Arguments

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

Returns

1 number
Time enemy was last reacquired.