Garry's Mod Wiki

Revision Difference

Structures/EmitSoundInfo#516806

<cat>struct</cat> <structure> <description>Passed as argument of <page>GM:EntityEmitSound</page>.</description> <fields> {{Structure |Description=Passed as argument of <page>GM:EntityEmitSound</page>. |Fields={{StructureField|string|SoundName|The file path of the played sound. {{StructureField|string|SoundName|The file path of the played sound. Sounds prefixed with ) tell the sound engine that it is a spatial sound; this allows the sound to emit from a specific location within the world. Sounds prefixed with ^ tell the sound engine that it is a distance based sound. The left channel of the .wav is the 'near' sound that will play when the sound originates close to you, and the right channel is the 'far' sound that will play when the sound originates far from you. </fields> }}{{StructureField|string|OriginalSoundName|The original file path or soundscript name. </structure> {{StructureField|string|OriginalSoundName|The original file path or soundscript name. Even if the SoundName value is changed, the OriginalSoundName value will remain the same. Sounds may be returned as soundscripts (for example, "Weapon_357.Single") instead of the sound's file path. You can use <page>sound.GetProperties</page> to retrieve the actual file path. }}{{StructureField|number|SoundTime|The time at which the sound should be played. If equal to 0 or CurTime(), the sound is played immediately. If greater than CurTime(), the sound is played with a delay. If less than CurTime(), part of the sound is skipped.|0 }}{{StructureField|number|DSP|The DSP (digital signal processing) preset applied to the sound. There are approximately 134 different presets defined by the Source engine between 0 and 133. These presets represent different types of 'rooms' or environments. [List of DSP's](https://developer.valvesoftware.com/wiki/Dsp_presets)|0 }}{{StructureField|number|SoundLevel|The sound's attenuation, a number between 0 (low) and 511 (high) This determines how fast the sound drops away. A higher value means the sound can be heard farther away. See <page>SNDLVL</page>.|75 }}{{StructureField|number|Pitch|The pitch of the played sound, a number between 0 (low) and 255 (high), where 100 is the sound's original pitch.|100}}{{StructureField|number|Flags|The bit flags of the played sound. See <page>SND</page> for available options.|0}}{{StructureField|number|Channel|The sound's channel. See <page>CHAN</page> for available options.}}{{StructureField|number|Volume|The volume of the played sound, return as a decimal number between 0 (low) and 1 (high).}}{{StructureField|Entity|Entity|The entity that played the sound.}}{{StructureField|Vector|Pos|The origin of the played sound.}} }}