StopInstance - Sound
Member of: Sound Script
Cause the given playback instance to cease playback. The next time the sound is played it will have a new instance ID.
SyntaxEdit
Function StopInstance(Int aiInstanceID) native global
ParametersEdit
- aiIstanceID: The integer value of the sound you wish to manipulate.
ExamplesEdit
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
NotesEdit
- This function is very useful if you wish to dynamically control the duration of a looping sound effect