Difference between revisions of "StopSound"

From The Official Visionaire Studio: Adventure Game Engine Wiki
Line 46: Line 46:
 
{| style="background: #f0f0f0; border: 1px dashed darkgrey" width="100%"
 
{| style="background: #f0f0f0; border: 1px dashed darkgrey" width="100%"
 
|-
 
|-
|<b>Relevant Pages</b>: [[GetSoundId|getSoundId]] - [[GetSoundProperty|getSoundProperty]] - [[SetSoundProperty|setSoundProperty]] - [[StartSound|stopSound]] - [[ToggleSoundPause|toggleSoundPause]]
+
|<b>Relevant Pages</b>: [[GetSoundId|getSoundId]] - [[GetSoundProperty|getSoundProperty]] - [[SetSoundProperty|setSoundProperty]] - [[StartSound|startSound]] - [[ToggleSoundPause|toggleSoundPause]]
 
|}
 
|}

Revision as of 19:58, 8 March 2013

Command History

Available since v3.8


Allows you to stop any playing sound files!


Syntax:

stopSound(id)


Example 1: basic stop audio file method! (!messy)

stopSound(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")
stopSound(soundID)


Arguments

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


Flags

none


Return

none


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