Global Command: toggleSoundPause

From The Official Visionaire Studio: Adventure Game Engine Wiki

Toggle an active sound between playing and paused states.

Related functions getSoundId | getSoundProperty | setSoundProperty | startSound | stopSound


Syntax

toggleSoundPause(soundId)


Parameters

Parameter Type Description
soundId integer Id of the sound which should be paused/resumed.


Return values

Type Description
boolean True if sound was successfully paused/resumed, false otherwise.


Examples

Example 1: Toggle the pause state of an active sound.

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

toggleSoundPause(mySoundId)