Definesound: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
mNo edit summary
 
mNo edit summary
Line 10: Line 10:
:2  Used for Music&SFX sprites
:2  Used for Music&SFX sprites
:4  Duke voice
:4  Duke voice
:8  Disabled when Parental Lockout is on
:8  Disabled when Parental Lock is on
:16 Global sound
:16 Global sound
*<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 32768.

Revision as of 16:09, 1 February 2005

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

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

  • <name>: The name by which the sound will be referred to in the CON files.
  • <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 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:
1 Repeat
2 Used for Music&SFX sprites
4 Duke voice
8 Disabled when Parental Lock is on
16 Global sound
  • <volume>: Negative values increase volume; positive ones soften it. Can range from -32768 to 32768.