Definesound: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
One (talk | contribs)
No edit summary
mNo edit summary
Line 5: Line 5:
*<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.
*<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.
*<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 maximum limit, and can be set lower as the user chooses.
*<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:
*<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 0 (1) Repeating

Revision as of 23:01, 25 March 2010

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.