Definesound

From EDukeWiki
Revision as of 22:01, 25 March 2010 by The Commander (talk | contribs)
Jump to navigation Jump to search

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 32768.