Difference between revisions of "StopSound"

From The Official Visionaire Studio: Adventure Game Engine Wiki
(Redirected page to Global Command: startSound)
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
<div class="toccolours mw-collapsible mw-collapsed tbl-ds">
+
#REDIRECT [[Global Command: startSound]]
<span class="bold">Command History</span>
 
<div class="mw-collapsible-content">
 
<div class="alt-bg">Available since v3.8</div>
 
</div></div>
 
 
 
 
 
Allows you to stop any playing sound files!
 
 
 
 
 
Syntax:
 
<syntaxhighlight>
 
stopSound(id)
 
</syntaxhighlight>
 
 
 
 
 
Example 1: basic stop audio file method! (!messy)
 
<syntaxhighlight>
 
stopSound(getSoundId("sounds/example.ogg"))
 
</syntaxhighlight>
 
 
 
Example 2: again using sound.id via a variable!
 
<syntaxhighlight>
 
-- let's store the sound.id for example.ogg inside of a variable!
 
local soundID = getSoundId("sounds/example.ogg")
 
stopSound(soundID)
 
</syntaxhighlight>
 
 
 
 
 
 
 
<span class="bold underline">Arguments</span>
 
 
 
<span class="bold">id</span>: integer (number) <br/>
 
The id for the currently playing audio file! ("sound.id")
 
 
 
 
 
<span class="bold underline">Flags</span>
 
 
 
none
 
 
 
 
 
<span class="bold underline">Return</span>
 
 
 
none
 
{{i18n|StopSound}} <br/>
 
{| class="tbl-ds"
 
|-
 
|<span class="bold">Relevant Pages</span>: [[GetSoundId|getSoundId]] - [[GetSoundProperty|getSoundProperty]] - [[SetSoundProperty|setSoundProperty]] - [[StartSound|startSound]] - [[ToggleSoundPause|toggleSoundPause]]
 
|}
 

Latest revision as of 13:37, 19 May 2023