Difference between revisions of "StopSound"
From The Official Visionaire Studio: Adventure Game Engine Wiki
| Line 1: | Line 1: | ||
| − | + | ==stopSound== | |
| − | |||
| − | |||
| − | |||
| − | |||
| + | <div class="command-min-version-info">Available since: <span class="command-min-version">v3.8</span></div> | ||
| − | + | <div class="command-doc">Stops the specified sound.</div> | |
| − | + | Lua Syntax: | |
| − | + | <pre class="command-syntax">stopSound(soundID)</pre> | |
| + | ===Arguments=== | ||
| + | ====soundID==== | ||
| + | :'''int''' - ID of the sound which should be stopped | ||
| + | ===Flags=== | ||
| + | ===Return Values=== | ||
| + | ;status | ||
| + | :True if sound was stopped successfully, false otherwise. | ||
| + | ===Examples=== | ||
| + | Example 1: | ||
<syntaxhighlight> | <syntaxhighlight> | ||
| − | + | local soundID = getSoundId('vispath:sounds/example.ogg') | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | local soundID = getSoundId( | ||
stopSound(soundID) | stopSound(soundID) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
Revision as of 17:12, 22 November 2013
stopSound
Available since: v3.8
Stops the specified sound.
Lua Syntax:
stopSound(soundID)
Arguments
soundID
- int - ID of the sound which should be stopped
Flags
Return Values
- status
- True if sound was stopped successfully, false otherwise.
Examples
Example 1:
local soundID = getSoundId('vispath:sounds/example.ogg')
stopSound(soundID)