audio.setVolume

Section: Audio

What it does

audio.setVolume sets Volume on an audio object. It takes url and volume.

Signature

audio.setVolume(url, volume)

Arguments

  • url
  • volume

Example · generated

function start() {  audio.setVolume('/audio/click.wav', 0.8);}

audio.setVolume is called with values of the shape its signature asks for. The code sits in start(), which the engine calls once, when the entity spawns.

3 members in audio