Sound Script: Difference between revisions

From the CreationKit Wiki
Jump to navigation Jump to search
imported>Rhavlovick
m (1 revision: Clobber re-import by Henning)
 
imported>Jog
Line 16: Line 16:


== Global Functions ==
== Global Functions ==
*Function [[SetInstanceVolume - Sound|SetInstanceVolume]](int aiInstanceID, float afVolume)
'''Function [[SetInstanceVolume - Sound|SetInstanceVolume]](int aiInstanceID, float afVolume)'''
**Modify the volume of a playing sound instance. Values outside of 0.0 - 1.0 will be clamped.
*Modify the volume of a playing sound instance. Values outside of 0.0 - 1.0 will be clamped.
*Function [[StopInstance- Sound|StopInstance]](int aiInstanceID)
 
**Cause the given playback instance to cease playback. The next time the sound is played it will have a new instance ID.
'''Function [[StopInstance- Sound|StopInstance]](int aiInstanceID)'''
*Cause the given playback instance to cease playback. The next time the sound is played it will have a new instance ID.


== Member Functions ==
== Member Functions ==

Revision as of 13:04, 20 February 2012


Extends: Form Script (Papyrus)

Script for the manipulation of sound base objects.

Definition

ScriptName Sound extends Form

Properties

None

Global Functions

Function SetInstanceVolume(int aiInstanceID, float afVolume)

  • Modify the volume of a playing sound instance. Values outside of 0.0 - 1.0 will be clamped.

Function StopInstance(int aiInstanceID)

  • Cause the given playback instance to cease playback. The next time the sound is played it will have a new instance ID.

Member Functions

  • int Function Play(ObjectReference akSource)
    • Plays this sound from the specified source object. The returned integer is the playback instance ID, which can be used to control the sound after it has been started.
  • bool Function PlayAndWait(ObjectReference akSource)
    • Plays this sound from the source object, and waits for the sound to finish.

Events

None