Sound functions
Free functions you can call directly in sprite code.
getSound
Section titled “getSound”getSound(soundName: string): SoundGet a sound object by name.
Delegates to Sprite.getSound
playSoundUntilDone
Section titled “playSoundUntilDone”playSoundUntilDone(sound: string): voidPlay a sound and wait until it finishes.
Pauses the script (a generator). In sprite code the free-function wrapper awaits it for you.
Delegates to Sprite.playSoundUntilDone
startSound
Section titled “startSound”startSound(sound: string): voidStart playing a sound without waiting.
Pauses the script (a generator). In sprite code the free-function wrapper awaits it for you.
Delegates to Sprite.startSound
stopAllOfMySounds
Section titled “stopAllOfMySounds”stopAllOfMySounds(): voidStop all sounds played by this sprite.
Delegates to Sprite.stopAllOfMySounds
stopAllSounds
Section titled “stopAllSounds”stopAllSounds(): voidStop all sounds in the project.
Delegates to Sprite.stopAllSounds