Structures/SoundData

From Garry's Mod
(Difference between revisions)
Jump to: navigation, search
m
m
 
Line 1: Line 1:
 
{{Structure
 
{{Structure
 
|Description=Table used in {{LibraryFunction|sound|Add}} and {{LibraryFunction|sound|GetProperties}}.
 
|Description=Table used in {{LibraryFunction|sound|Add}} and {{LibraryFunction|sound|GetProperties}}.
|Fields={{StructureField|number|channel|The sound channel to play in. See {{Enum|CHAN}}}}{{StructureField|string|name|The name of the sound.}}{{StructureField|number|pitchend|The pitch end. Deprecated, use pitch.}}{{StructureField|number|pitchstart|The initial pitch. Deprecated, use pitch.}}{{StructureField|number|level|The soundlevel of the sound in dB. See {{Enum|SNDLVL}}.}}{{StructureField|string|sound|The sound file to be used in this sound effect. Can be a table of sound files. Relative to "sound" directory.}}{{StructureField|number|volume|The volume of the sound as a decimal between 0 and 1. Can be a table of two numbers, a minimum and a maximum value.|1.0}}{{StructureField|number|pitch|The pitch of the sound. Can be a table of two numbers, a minimum and a maximum value.|100}}
+
|Fields={{StructureField|number|channel|The sound channel to play in. See {{Enum|CHAN}}}}{{StructureField|string|name|The name of the sound.}}{{StructureField|number|pitchend|The pitch end. Deprecated, use pitch.}}{{StructureField|number|pitchstart|The initial pitch. Deprecated, use pitch.}}{{StructureField|number|level|The soundlevel of the sound in dB. See {{Enum|SNDLVL}}.}}{{StructureField|string|sound|The sound file to be used in this sound effect. Can be a table of sound files. Relative to "sound" directory (must be in a subfolder, so sound/test.wav will not work).}}{{StructureField|number|volume|The volume of the sound as a decimal between 0 and 1. Can be a table of two numbers, a minimum and a maximum value.|1.0}}{{StructureField|number|pitch|The pitch of the sound. Can be a table of two numbers, a minimum and a maximum value.|100}}
 
}}
 
}}

Latest revision as of 03:43, 4 December 2019

Table used in sound.Add and sound.GetProperties.



Type Name Description
number channel

The sound channel to play in. See CHAN_ Enums

string name

The name of the sound.

number pitchend

The pitch end. Deprecated, use pitch.

number pitchstart

The initial pitch. Deprecated, use pitch.

number level

The soundlevel of the sound in dB. See SNDLVL_ Enums.

string sound

The sound file to be used in this sound effect. Can be a table of sound files. Relative to "sound" directory (must be in a subfolder, so sound/test.wav will not work).

number volume

The volume of the sound as a decimal between 0 and 1. Can be a table of two numbers, a minimum and a maximum value.

Default: 1.0

number pitch

The pitch of the sound. Can be a table of two numbers, a minimum and a maximum value.

Default: 100

Personal tools
Navigation