Sound Script: Difference between revisions

From the CreationKit Wiki
Jump to navigation Jump to search
imported>CraftySentinel
(Added SKSE Function GetDescriptor)
imported>CraftySentinel
(Reverted to List, fixed Link error/spelling)
Line 14: Line 14:
== Properties ==
== Properties ==
None
None


== Global Functions ==
== Global Functions ==


{|class="wikitable" width =100%
:'''[[SetInstanceVolume - Sound|SetInstanceVolume]](Int ''aiInstanceID'', Float ''afVolume'')'''
!style="text-align:left;"|Function
:*Modify the volume of a playing sound instance. Values outside of 0.0 - 1.0 will be clamped.
!style="text-align:left;"|Description
|-
|[[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.
|-


|[[StopInstance- Sound|'''StopInstance-'''(Int ''aiInstanceID'')]]
:'''[[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.
:*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 ==


{|class="wikitable" width =100%
:'''Int [[Play - Sound|Play]](ObjectReference ''akSource'')'''
!style="text-align:left;"|Function
:*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.
!style="text-align:left;"|Description
|-
|[[Play - Sound|Int '''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.
|-


|[[PlayAndWait - Sound|Bool '''PlayAndWait'''(ObjectReference ''akSource'')]]
:'''Bool [[PlayAndWait - Sound|PlayAndWait]](ObjectReference ''akSource'')'''
|Plays this sound from the source object, and waits for the sound to finish.
:*Plays this sound from the source object, and waits for the sound to finish.
|-


|}


== SKSE Member Functions ==
== SKSE Member Functions ==
{|class="wikitable" width =100%
!style="text-align:left;"|Function
!style="text-align:left;"|Description
|-


|[[GetDescriptor - Sound|SoundDescriptor '''GetDescriptor'''()]]
:'''SoundDescriptor [[GetDescriptor - Sound|GetDescriptor]]()'''
|
:*Returns the SoundDescriptor of the Sound.
|-
 
|}


== Events ==
== Events ==
None
None

Revision as of 22:06, 2 February 2014


Extends: Form Script (Papyrus)

Script for the manipulation of sound base objects.

Definition

ScriptName Sound extends Form

Properties

None


Global Functions

SetInstanceVolume(Int aiInstanceID, Float afVolume)
  • Modify the volume of a playing sound instance. Values outside of 0.0 - 1.0 will be clamped.
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 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 PlayAndWait(ObjectReference akSource)
  • Plays this sound from the source object, and waits for the sound to finish.


SKSE Member Functions

SoundDescriptor GetDescriptor()
  • Returns the SoundDescriptor of the Sound.


Events

None