Difference between revisions of "ToggleSoundPause"

From The Official Visionaire Studio: Adventure Game Engine Wiki
(Created page with "<div class="toccolours mw-collapsible mw-collapsed" style="background: #f0f0f0; border: 1px dashed darkgrey" width="100%"> <b>Command History</b> <div class="mw-collapsible-co...")
(No difference)

Revision as of 20:14, 14 March 2013

Command History

Available since v3.8


Allows you to stop any playing sound files!


Syntax:

stopSound(id)


Example 1: basic toggle pause/resume audio file method! (!messy)

toggleSoundPause(getSoundId("sounds/example.ogg"))

Example 2: again using sound.id via a variable!

-- let's store the sound.id for example.ogg inside of a variable!
local soundID = getSoundId("sounds/example.ogg")
toggleSoundPause(soundID)


Arguments

id: integer (number)
The id for the currently playing audio file! ("sound.id")


Flags

none


Return

success Returns true or false boolean value depending on if the linked sound was successfully paused or resumed!


Relevant Pages: getSoundId - getSoundProperty - setSoundProperty - startSound - stopSound