Difference between revisions of "StopSound"

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...")
 
(Redirected page to Global Command: startSound)
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<div class="toccolours mw-collapsible mw-collapsed" style="background: #f0f0f0; border: 1px dashed darkgrey" width="100%">
+
#REDIRECT [[Global Command: startSound]]
<b>Command History</b>
 
<div class="mw-collapsible-content">
 
<div style="background:#ebebeb" width="100%">Available since <span style="color:orange">v3.8</span></div>
 
</div></div>
 
 
 
 
 
Allows you to stop any playing sound files!
 
 
 
 
 
Syntax:
 
<syntaxhighlight>
 
stopSound(id)
 
</syntaxhighlight>
 
 
 
 
 
Example 1: basic stop audio file method! (!awful code)
 
<syntaxhighlight>
 
stopSound(getSoundId("sounds/example.ogg"))
 
</syntaxhighlight>
 
 
 
Example 2: again using sound.id via a variable!
 
<syntaxhighlight>
 
local soundID = getSoundId("sounds/example.ogg")
 
stopSound(soundID)
 
</syntaxhighlight>
 
 
 
 
 
 
 
<b><u>Arguments</u></b>
 
 
 
<b>id</b>: integer (number) <br/>
 
The id for the currently playing audio file! ("sound.id")
 
 
 
 
 
<b><u>Flags</u></b>
 
 
 
none
 
 
 
 
 
<b><u>Return</u></b>
 
 
 
none
 
{{i18n|StartSound}} <br/>
 
{| style="background: #f0f0f0; border: 1px dashed darkgrey" width="100%"
 
|-
 
|<b>Relevant Pages</b>: [[GetSoundId|getSoundId]] - [[GetSoundProperty|getSoundProperty]] - [[SetSoundProperty|setSoundProperty]] - [[StartSound|stopSound]] - [[ToggleSoundPause|toggleSoundPause]]
 
|}
 

Latest revision as of 13:37, 19 May 2023