Definesound: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
mNo edit summary
m INT16_MAX==32767
Line 12: Line 12:
:BIT 3 (8) Parental Lockout (disabled when Adult Mode is off)
:BIT 3 (8) Parental Lockout (disabled when Adult Mode is off)
:BIT 4 (16) Global Sound (sndist = 0)
:BIT 4 (16) Global Sound (sndist = 0)
*<volume>: Negative values increase volume; positive ones soften it.  Can range from -32768 to 32768.
*<volume>: Negative values increase volume; positive ones soften it.  Can range from -32768 to 32767.


[[Category:Duke3D 1.3/1.5 commands]]
[[Category:Duke3D 1.3/1.5 commands]]
[[Category:Sound manipulation]]
[[Category:Sound manipulation]]

Revision as of 10:45, 28 October 2011

definesound <value> <filename> <pitch1> <pitch2> <priority> <type> <volume>

The definesound command defines a sound and assigns various properties to it.

  • <value>: This can be either the sound's number or the name that has been defined for that number.
  • <filename>: The name of the sound file. Sound files are assumed to be in the same directory as the program unless a folder path is specified.
  • <pitch1> and <pitch2>: According to the comments in the default user.con, these are a "random pitch variation range." Values may be positive or negative.
  • <priority>: A value of 0 to 255 indicates the priority the sound has over other sounds that are playing simultaneously. The higher the value, the greater its priority. This is due to the limit on the number of sounds that can play at once. 32 is the default maximum limit, and can be set lower as the user chooses.
  • <type>: This flag indicates what type of sound you are defining and can be added together much the way cstat values are:
BIT 0 (1) Repeating
BIT 1 (2) Used for MUSICANDSFX sprites
BIT 2 (4) Duke Voice Clip
BIT 3 (8) Parental Lockout (disabled when Adult Mode is off)
BIT 4 (16) Global Sound (sndist = 0)
  • <volume>: Negative values increase volume; positive ones soften it. Can range from -32768 to 32767.