Difference between revisions of "ToggleSoundPause"

From The Official Visionaire Studio: Adventure Game Engine Wiki
(Redirected page to Global Command: toggleSoundPause)
 
(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: toggleSoundPause]]
<span>Command History</span>
 
<div class="mw-collapsible-content">
 
<div class="alt-bg">Available since v3.8</div>
 
</div></div>
 
 
 
 
 
Allows you to toggle between pause & resume of an active linked sound!
 
 
 
 
 
Syntax:
 
<syntaxhighlight>
 
toggleSoundPause(id)
 
</syntaxhighlight>
 
 
 
 
 
Example 1: basic toggle pause/resume audio file method! (!messy)
 
<syntaxhighlight>
 
toggleSoundPause(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")
 
toggleSoundPause(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>
 
 
 
<span class="bold">success</span> <br/>
 
Returns true or false boolean value depending on if the linked sound was successfully paused or resumed!
 
{{i18n|ToggleSoundPause}} <br/>
 
{| class="tbl-ds"
 
|-
 
|<span class="bold">Relevant Pages</span>: [[GetSoundId|getSoundId]] - [[GetSoundProperty|getSoundProperty]] - [[SetSoundProperty|setSoundProperty]] - [[StartSound|startSound]] - [[StopSound|stopSound]]
 
|}
 

Latest revision as of 13:37, 19 May 2023