- Found in:
- Dylbills PE
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
SoundakSound
ObjectReferenceakSource
floatvolume=1.0
FormeventReceiverForm=NONE
AliaseventReceiverAlias=NONE
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)