NPC.AlertSound
From GMod Wiki
Revision as of 01:50, 9 January 2011 by Disseminate (Talk | contribs)
| Function | |
| Syntax | NPC:AlertSound( ) |
| Description: | |
| Plays the NPC's 'alert sound' defined in the engine. | |
| Returns: | nil |
| In Object: | Npc |
| Realm: |
|
| BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=NPC.AlertSound]NPC.AlertSound [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
| Description | Make all headcrabs play their alert cry. |
|---|---|
| Used on | |
| Code | for _, v in pairs( ents.FindByClass( "npc_headcrab" ) ) do v:AlertSound(); end |
| Output | The NPC will cry out. |
Additional Notes
- Seems to be broken for every NPC.