SetInstanceVolume - Sound

Member of: Sound Script

Modify the volume of a playing sound instance.

SyntaxEdit

Function SetInstanceVolume(int aiPlaybackInstance, float afVolume) native global

ParametersEdit

  • 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 ValueEdit

None.

ExamplesEdit

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

See AlsoEdit