Skip to content

Sound functions

Free functions you can call directly in sprite code.

getSound(soundName: string): Sound

Get a sound object by name.

See also Sprite.getSound

playSoundUntilDone(sound: string): void

Play a sound and wait until it finishes.

⏸️ This pauses your script until it finishes — the next line runs only after it’s done.

See also Sprite.playSoundUntilDone

Used by

startSound(sound: string): void

Start playing a sound without waiting.

⏸️ This pauses your script until it finishes — the next line runs only after it’s done.

See also Sprite.startSound

Used by

stopAllOfMySounds(): void

Stop all sounds played by this sprite.

See also Sprite.stopAllOfMySounds

stopAllSounds(): void

Stop all sounds in the project.

See also Sprite.stopAllSounds