Skip to content

Sound Hints

Sound hints are used by NPCs to get extra context a sound and how to react to it. There are also hints that are used to mimic a smell, such as an organic corpse.

Sound hints can be produced in Lua using sound.EmitHint

Enumerations

Garry's Mod Wiki Page

Table Key

❌ – Unused by the Engine (Can still be used in Lua)

Enumeration Name Bit Number Default Triggers
SOUND_NONE 0 No Sounds
SOUND_COMBAT 1 Grenade explosions
SOUND_WORLD 2 N/A
SOUND_PLAYER 4 Footsteps
SOUND_DANGER 8 Props on fire, barrels about to explode, combine rappelling??, Combine Mine triggered, SMG1 grenades, HL2 grenade, Antlion Worker spit, Antlion Guard Charge, Combine Helicopter turret impact location & bomb drop warning, Combine Dropship deploy & turret impact locations, Combine Gunship belly cannon & turret impact locations, Manhacks opening their blades, Rollermine about to self-destruct, Stalker laser impact location, Zombine Grenade, Combine APC moving, in the path of an Airboat
SOUND_BULLET_IMPACT 16 Bullet holes
SOUND_CARCASS ❌ 32 UNUSED in Source
SOUND_MEAT ❌ 64 UNUSED in Source
SOUND_GARBAGE ❌ 128 UNUSED in Source
SOUND_THUMPER 256 HL2 Combine Thumper
SOUND_BUGBAIT 512 Impact Location (Not squeeze!)
SOUND_PHYSICS_DANGER 1024 N/A
SOUND_DANGER_SNIPERONLY 2048 N/A (Supposed to scare Combine Snipers)
SOUND_MOVE_AWAY 4096 N/A
SOUND_PLAYER_VEHICLE 8192 Airboats
SOUND_READINESS_LOW ❌ 16384 UNUSED, purpose was for player companion
SOUND_READINESS_MEDIUM ❌ 32768 UNUSED, purpose was for player companion
SOUND_READINESS_HIGH ❌ 65536 UNUSED, purpose was for player companion
SOUND_CONTEXT_FROM_SNIPER 1048576 Combine Sniper aim position
SOUND_CONTEXT_GUNFIRE 2097152 Added to SOUND_COMBAT, only used by AR2/SMG1/Pistol
SOUND_CONTEXT_MORTAR 4194304 Mortars from func_tank
SOUND_CONTEXT_COMBINE_ONLY 8388608 Combine Dropship deployment location, hacked friendly Rollermines, Combine throwing grenades
SOUND_CONTEXT_REACT_TO_SOURCE 16777216 Made for reacting to the source's origin, not the sound's location: Combine Sniper laser position, Strider minigun impact position, enemy/friendly Rollermines moving, Gunship's belly cannon impact position, Dropship's turret impact position, Hunter's Flechette impact position
SOUND_CONTEXT_EXPLOSION 33554432 RadiusBlast, Combine ball exploding
SOUND_CONTEXT_EXCLUDE_COMBINE 67108864 Things that Combine should ignore: Strider Legs, Attacking Rollermine, Hunter Flechette
SOUND_CONTEXT_DANGER_APPROACH 134217728 Enemy & friendly Rollermines
SOUND_CONTEXT_ALLIES_ONLY 268435456 Only used for barnacles + does NOT work
SOUND_CONTEXT_PLAYER_VEHICLE 536870912 Jeep or Jalopy

Combinations

Sound hints can be combined by doing a bit OR operation. There are couple of combinations that the engine uses which are listed below.

Example combination in Lua: bit.bor(SOUND_DANGER, SOUND_CONTEXT_EXCLUDE_COMBINE)

Enum combination Default Triggers
SOUND_DANGER, SOUND_CONTEXT_EXCLUDE_COMBINE Flechette impact position, Strider foot impact position
SOUND_DANGER, SOUND_CONTEXT_REACT_TO_SOURCE Combine dropship impact position, Combine gunship turret impact position, Strider minigun impact position
SOUND_DANGER, SOUND_CONTEXT_PLAYER_VEHICLE Detects when a player is driving a Jeep or Jalopy (Not Airboats!)
SOUND_DANGER, SOUND_CONTEXT_MORTAR Combine mortars impact position