Difference between revisions of "GetSoundId"

From The Official Visionaire Studio: Adventure Game Engine Wiki
(Redirected page to Global Command: getSoundId)
 
(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: getSoundId]]
<span class="bold">Command History</span>
 
<div class="mw-collapsible-content">
 
<div class="alt-bg">Available since v3.8</div>
 
</div></div>
 
 
 
 
 
Use this to store the sound.id for an audio file into a variable; which you can use to stop/pause/resume or edit the linked sounds properties!
 
 
 
 
 
 
 
Syntax:
 
<syntaxhighlight>
 
getSoundId("filename")
 
</syntaxhighlight>
 
 
 
 
 
<syntaxhighlight>
 
-- let's store the sound ID into a variable for later use!
 
local soundID = getSoundId("sounds/example.ogg")
 
</syntaxhighlight>
 
 
 
 
 
 
 
<span class="bold underline">Arguments</span>
 
 
 
<span class="bold">filename</span>: path <br/>
 
The path to the audio file whose ID we want to obtain! ("path/filename.type")
 
 
 
 
 
<span class="bold underline">Flags</span>
 
 
 
none
 
 
 
 
 
<span class="bold underline">Return</span>
 
 
 
<span class="bold">id</span> <br/>
 
Returns the sound ID as an integer value.
 
{{i18n|GetSoundId}} <br/>
 
{| class="tbl-ds"
 
|-
 
|<span class="bold">Relevant Pages</span>: [[GetSoundProperty|getSoundProperty]] - [[SetSoundProperty|setSoundProperty]] - [[StartSound|startSound]] - [[StopSound|stopSound]] - [[ToggleSoundPause|toggleSoundPause]]
 
|}
 

Latest revision as of 13:25, 19 May 2023