Difference between revisions of "ToggleSoundPause"

From The Official Visionaire Studio: Adventure Game Engine Wiki
(Redirected page to Global Command: toggleSoundPause)
 
(4 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: toggleSoundPause]]
<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 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>
 
 
 
 
 
 
 
<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>
 
 
 
<b>success</b> <br/>
 
Returns true or false boolean value depending on if the linked sound was successfully paused or resumed!
 
{{i18n|ToggleSoundPause}} <br/>
 
{| style="background: #f0f0f0; border: 1px dashed darkgrey" width="100%"
 
|-
 
|<b>Relevant Pages</b>: [[GetSoundId|getSoundId]] - [[GetSoundProperty|getSoundProperty]] - [[SetSoundProperty|setSoundProperty]] - [[StartSound|startSound]] - [[StopSound|stopSound]]
 
|}
 

Latest revision as of 12:37, 19 May 2023