StopInstance - Sound

From the Fallout4 CreationKit Wiki
Jump to navigation Jump to search

Member of: Sound Script

Stop playback of a sound instance.

Syntax[edit | edit source]

Function StopInstance(int aiPlaybackInstance) native global

Parameters[edit | edit source]

  • aiPlaybackInstance: The instance ID of the sound to stop.

Return Value[edit | edit source]

None.

Examples[edit | edit source]

;This example is from an objectReference script
int instanceID = myLoopingSFX.play(self)    ; play myLoopingSFX sound from my self
Wait(10.0)                                  ; wait while the sound is looping
Sound.StopInstance(instanceID)              ; stop the sound after looping for 10 seconds

See Also[edit | edit source]