audio.play

Section: Audio

What it does

audio.play acts on audio: it plays. It takes url and options. options is optional.

Signature

audio.play(url, options?)

Arguments

  • url
  • optionsoptional

Example · generated

function start() {  audio.play('/audio/click.wav');}

audio.play 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