Garry's Mod Wiki

Revision Difference

Structures/SoundData#517042

<cat>struct</cat> <structure> <description>Table used in <page>sound.Add</page> and <page>sound.GetProperties</page>.</description> <fields>{{StructureField|number|channel|The sound channel to play in. See <page>CHAN</page></fields>⤶ <fields>⤶ <item name="channel" type="number">The sound channel to play in. See <page>CHAN</page></item>⤶ <item name="name" type="string">The name of the sound.</item>⤶ <item name="pitchend" type="number">The pitch end. Deprecated, use pitch.</item>⤶ <item name="pitchstart" type="number">The initial pitch. Deprecated, use pitch.</item>⤶ <item name="level" type="number">The soundlevel of the sound in dB. See <page>SNDLVL</page>.</item>⤶ <item name="sound" type="string">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).</item>⤶ {{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⤶ </fields>⤶ </structure> {{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 <page>SNDLVL</page>.}}{{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}} {{StructureField|number|pitch|The pitch of the sound. Can be a table of two numbers, a minimum and a maximum value.|100}} }}