Background for Fallout 4
Member of the Sound script
voidfunctionSetInstanceVolume(intaiPlaybackInstance, floatafVolume)NativeGlobal

Description

Wiki Description

Modify the volume of a playing sound instance.

Documentation Comment

Set the volume of a given playback instance of a sound. Clamped between 0 and 1.


Caveats


Parameters

intaiPlaybackInstance

CK Wiki Description

The instance ID of the sound whose playback volume we wish to modify.

floatafVolume

CK Wiki Description

The desired volume of a playing sound instance. Values outside of 0.0 - 1.0 will be clamped.


Examples

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

Auto-Generated Example

int myInt__aiPlaybackInstance
float myFloat__afVolume

Sound.SetInstanceVolume(myInt__aiPlaybackInstance, myFloat__afVolume)

Related Pages


Additional References

View this function’s page on the Fallout 4 Creation Kit Wiki

Some data provided by the Fallout 4 Creation Kit Wiki. Licensed under the Creative Commons Attribution-Share Alike 4.0 license.