Field manual / Level editor
sound — Sound
Sounds and ambient.
Summary
sound::Play | Plays a sound at the calling object's position; a nonzero loop makes it loop. |
sound::PlayRandom2D | Plays a random sound from a comma-separated list (up to 10) at background point (x, y). |
sound::NewAmbient | Creates an ambient object: a looping sound at background point (x, y). |
Functions
sound::Play(sound, ?int) → int
Plays a sound at the calling object's position; a nonzero loop makes it loop.
sound::PlayRandom2D(int, int, string, ?int) → int
Plays a random sound from a comma-separated list (up to 10) at background point (x, y). With chance > 0 it plays only with probability 1/chance.
sound::NewAmbient(string, int, int, string) → int
Creates an ambient object: a looping sound at background point (x, y). Does nothing if an object with this name already exists.