Garry's Mod Wiki

ENTITY:GetSoundInterests

  number ENTITY:GetSoundInterests()

Description

Called every second to poll the sound hint interests of this SNPC. This is used in conjunction with other sound hint functions, such as sound.EmitHint and NPC:GetBestSoundHint.

This hook only exists for ai type SENTs

Returns

1 number types
A bitflag representing which sound types this NPC wants to react to. See SOUND_ enums.

Example

React to player footstep sounds.

function ENT:GetSoundInterests( ) return SOUND_WORLD + SOUND_PLAYER end