Entity/EmitSound

From Garry's Mod
(Difference between revisions)
Jump to: navigation, search
m (Huh, the starting soundlevel is actually 75 according to the entityemitsound hook.)
Line 14: Line 14:
 
|type=number
 
|type=number
 
|name=soundLevel
 
|name=soundLevel
|desc=A modifier for the distance this sound will reach, acceptable range is 0 to 511. 100 means no adjustment to the level.
+
|desc=A modifier for the distance this sound will reach, acceptable range is 0 to 511. 100 means no adjustment to the level. See {{Enum|SNDLVL}}
 
|default=75
 
|default=75
 
}}
 
}}
Line 33: Line 33:
 
|name=channel
 
|name=channel
 
|desc=The sound channel , see {{Enum|CHAN}}
 
|desc=The sound channel , see {{Enum|CHAN}}
<br>'''NOTE:'''For weapons this is instead set to CHAN_WEAPON.
+
<br>'''NOTE:''' For weapons this is instead set to CHAN_WEAPON.
 
|default=CHAN_AUTO
 
|default=CHAN_AUTO
 
}}
 
}}

Revision as of 11:11, 14 October 2014

 Entity:EmitSound( )

Contents

Description

Plays a sound on an entity. If run clientside, the sound will only be heard locally.

Arguments

string soundName

The name of the sound to be played.

Arguments

number soundLevel=75

A modifier for the distance this sound will reach, acceptable range is 0 to 511. 100 means no adjustment to the level. See SNDLVL_ Enums

Arguments

number pitchPercent=100

The pitch applied to the sound. The acceptable range is from 0 to 255. 100 means the pitch is not changed.

Arguments

number volume=1

The volume, from 0 to 1.

Arguments

number channel=CHAN_AUTO

The sound channel , see CHAN_ Enums


NOTE: For weapons this is instead set to CHAN_WEAPON.
Personal tools
Navigation