Difference between revisions of "SoundCategory Script"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>Jlundin
 
imported>CraftySentinel
m (→‎Member Functions: Reverted to List)
 
(3 intermediate revisions by 3 users not shown)
Line 19: Line 19:


== Member Functions ==
== Member Functions ==
*Function [[Mute - SoundCategory|Mute]]()
 
**Render inaudible any sounds in the given sound category.
:'''[[Mute - SoundCategory|Mute]]()'''
*Function [[Pause - SoundCategory|Pause]]()
:*Render inaudible any sounds in the given sound category.
**Pause any playing sounds in the given sound category. When restarted any stopped sounds will resume playing from the point at which they were paused.
 
*Function [[SetFrequency - SoundCategory|SetFrequency]](float afFrequencyCoeffecient)
:'''[[Pause - SoundCategory|Pause]]()'''
**Set a frequency modifier [0.0 - 1.0] for any sounds in this category
:*Pause any playing sounds in the given sound category. When restarted any stopped sounds will resume playing from the point at which they were paused.
*Function [[SetVolume - SoundCategory|SetVolume]](float afVolume)
 
**Set a volume modifier [0.0 - 1.0] for any sounds in this category
:'''[[SetFrequency - SoundCategory|SetFrequency]](Float ''afFrequencyCoeffecient'')'''
*Function [[UnMute - SoundCategory|UnMute]]()
:*Set a frequency modifier [0.0 - 1.0] for any sounds in this category
**Render audible sounds in the given sound category that were previously Muted.  
 
*Function [[UnPause - SoundCategory|UnPause]]()
:'''[[SetVolume - SoundCategory|SetVolume]](Float ''afVolume'')'''
**Play any sounds in the given sound category that are currently paused.
:*Set a volume modifier [0.0 - 1.0] for any sounds in this category
 
:'''[[UnMute - SoundCategory|UnMute]]()'''
:*Render audible sounds in the given sound category that were previously Muted.  
 
:'''[[UnPause - SoundCategory|UnPause]]()'''
:*Play any sounds in the given sound category that are currently paused.


== Events ==
== Events ==
None
None
== Notes ==
*A sound category's current volume, mute state or frequency are not stored in savegames. They will be persisted throughout the gaming session. In other words, if you mute a sound category in a script, then load a game that was saved before the mute took place, ''that sound category will still be muted''. Be cautious!
*Using the Mute, SetFrequency or SetVolume functions will mute the given sound category as well as any sound categories contained within it. Here is the hierarchy of sound categories as defined by the vanilla game:
**Master
***MUS
***PausedDuringMenu
****VOCGeneral
*****NonVOC
*****VOC
***PausedDuringMenuLoad
****SFX
*****UI
*****SFXFadeDuringDialogue
******PausedDuringMenuFade
*******AMBr
*******MAG
*******MuteSubmerged
******AMB
******FST
******FSTnpc
******NPCKillMove

Latest revision as of 22:09, 2 February 2014


Extends: Form Script

Script for the manipulation of sound category objects.

Definition[edit | edit source]

ScriptName SoundCategory extends Form

Properties[edit | edit source]

None

Global Functions[edit | edit source]

None

Member Functions[edit | edit source]

Mute()
  • Render inaudible any sounds in the given sound category.
Pause()
  • Pause any playing sounds in the given sound category. When restarted any stopped sounds will resume playing from the point at which they were paused.
SetFrequency(Float afFrequencyCoeffecient)
  • Set a frequency modifier [0.0 - 1.0] for any sounds in this category
SetVolume(Float afVolume)
  • Set a volume modifier [0.0 - 1.0] for any sounds in this category
UnMute()
  • Render audible sounds in the given sound category that were previously Muted.
UnPause()
  • Play any sounds in the given sound category that are currently paused.

Events[edit | edit source]

None

Notes[edit | edit source]

  • A sound category's current volume, mute state or frequency are not stored in savegames. They will be persisted throughout the gaming session. In other words, if you mute a sound category in a script, then load a game that was saved before the mute took place, that sound category will still be muted. Be cautious!
  • Using the Mute, SetFrequency or SetVolume functions will mute the given sound category as well as any sound categories contained within it. Here is the hierarchy of sound categories as defined by the vanilla game:
    • Master
      • MUS
      • PausedDuringMenu
        • VOCGeneral
          • NonVOC
          • VOC
      • PausedDuringMenuLoad
        • SFX
          • UI
          • SFXFadeDuringDialogue
            • PausedDuringMenuFade
              • AMBr
              • MAG
              • MuteSubmerged
            • AMB
            • FST
            • FSTnpc
            • NPCKillMove