Background for Skyrim SE
Member of the Sound script
voidfunctionStopInstance(intaiPlaybackInstance)NativeGlobal

Description

Wiki Description

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

Documentation Comment

Stops a given playback instance of a sound


Caveats

CK Wiki - Notes

  • This function is very useful if you wish to dynamically control the duration of a looping sound effect

Parameters

intaiPlaybackInstance

CK Wiki Description

The integer value of the sound you wish to manipulate.


Examples

Int instanceID

Event OnEffectStart(Actor akTarget, Actor akCaster)

  instanceID = mySFX.play(akTarget)          ; play mySFX sound from the akTarget

EndEvent


Event OnEffectFinish(Actor akTarget, Actor akCaster)

  Sound.StopInstance(instanceID)             ; stop the instanceID sound effect

EndEvent

Auto-Generated Example

int myInt__aiPlaybackInstance

Sound.StopInstance(myInt__aiPlaybackInstance)

Related Pages


Additional References

View this function’s page on the Skyrim Creation Kit Wiki

Some data provided by the Skyrim Creation Kit Wiki. Licensed under the Creative Commons Attribution-ShareAlike license.