Global Command: stopSound

From The Official Visionaire Studio: Adventure Game Engine Wiki

Stop a playing sound.

Related functions getSoundId | getSoundProperty | setSoundProperty | startSound | toggleSoundPause


Syntax

stopSound(soundId)


Parameters

Parameter Type Description
soundId integer Id of the sound to stop.


Return values

Type Description
boolean True if sound was stopped successfully, false otherwise.


Examples

Example 1: Stop a playing sound.

-- Sound id can only be retrieved if the sound is active
local mySoundId = getSoundId('vispath:sounds/example.ogg')

stopSound(mySoundId)