Difference between revisions of "GetSoundId (CMS)"

From The Official Visionaire Studio: Adventure Game Engine Wiki
(Created page with "<div class="toccolours mw-collapsible mw-collapsed tbl-ds"> <span class="bold">Command History</span> <div class="mw-collapsible-content"> <div class="alt-bg">Available since ...")
 
(Redirected page to Global Command: getSoundId)
 
(7 intermediate revisions by 2 users 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_(CMS)}} <br/>
 
{| class="tbl-ds"
 
|-
 
|<span class="bold">Relevant Pages</span>: [[GetSoundProperty_(CMS)|getSoundProperty]] - [[SetSoundProperty_(CMS)|setSoundProperty]] - [[StartSound_(CMS)|startSound]] - [[StopSound_(CMS)|stopSound]] - [[ToggleSoundPause_(CMS)|toggleSoundPause]]
 
|}
 

Latest revision as of 19:54, 4 May 2023