Mod:Creation Kit/SetInstanceVolume - Sound

Member of: Mod:Creation Kit/Sound Script

Modify the volume of a playing sound instance.

Syntax
Function SetInstanceVolume(int aiPlaybackInstance, float afVolume) native global

Parameters

 * aiPlaybackInstance: The instance ID of the sound whose playback volume we wish to modify.
 * afVolume: The desired volume of a playing sound instance. Values outside of 0.0 - 1.0 will be clamped.

Return Value
None.

Examples
int instanceID = mySFX.play(self)         ; play mySFX sound from my self Sound.SetInstanceVolume(instanceID, 0.5)  ; play at half volume