Background for Skyrim SE
Member of the DbSkseFunctions script
intfunctionPlaySound(SoundakSound, ObjectReferenceakSource, floatvolume=1.0, FormeventReceiverForm=NONE, AliaseventReceiverAlias=NONE, ActiveMagicEffecteventReceiverActiveEffect=NONE)NativeGlobal

Description

Documentation Comment

PlaySound / PlaySoundDescriptor returns instanceID like Sound.play(), but you can pass in a form, alias or activeMagicEffect to receive the OnSoundFinish Event.
Example, if your script extends form:
DbSkseFunctions.PlaySound(akSound, Game.GetPlayer(), 1.0, self) ;play sound and receive the OnSoundFinish event when sound finishes playing.
You can also set a start volume.


Parameters

  1. SoundakSound

  2. ObjectReferenceakSource

  3. floatvolume=1.0

  4. FormeventReceiverForm=NONE

  5. AliaseventReceiverAlias=NONE

  6. ActiveMagicEffecteventReceiverActiveEffect=NONE


Examples

Auto-Generated Example

Sound mySound__akSound
ObjectReference myObjectReference__akSource
float myFloat__volume
Form myForm__eventReceiverForm
Alias myAlias__eventReceiverAlias
ActiveMagicEffect myActiveMagicEffect__eventReceiverActiveEffect

int returnedValue = DbSkseFunctions.PlaySound(mySound__akSound, myObjectReference__akSource, myFloat__volume, myForm__eventReceiverForm, myAlias__eventReceiverAlias, myActiveMagicEffect__eventReceiverActiveEffect)
Some data provided by the Skyrim Creation Kit Wiki. Licensed under the Creative Commons Attribution-ShareAlike license.