G.WorldSound
From GMod Wiki
Function | |
Syntax |
WorldSound( String sound, Vector origin, Number amplitude, Number pitch ) Where is this used? |
Description: | |
Plays a sound originating from the world?. | |
Returns: | nil |
Part of Library: | Global Functions |
Realm: | |
BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=G.WorldSound]G.WorldSound [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
Description | Plays a sound |
---|---|
Used on | |
Code | WorldSound( "weapons/ar2/npc_ar2_altfire.wav", Vector( 0, 0, 0 ), 160, 130 ) |
Output | A sound is played at the origin |
Additional Notes
- amplitude (aka loudness) should be a number between 0 and 255. It defaults to 75.
- pitch should be a number between 0 and 255. It defaults to 100.
- Try to keep the amplitude at or below 165 to ensure that the sound plays.