Difference between revisions of "GetSoundId (CMS)"

From The Official Visionaire Studio: Adventure Game Engine Wiki
m
Line 37: Line 37:
 
<span class="bold">id</span> <br/>
 
<span class="bold">id</span> <br/>
 
Returns the sound ID as an integer value.
 
Returns the sound ID as an integer value.
{{i18n|GetSoundId_(CMS)}} <br/>
+
<br/>
 
{| class="tbl-ds"
 
{| class="tbl-ds"
 
|-
 
|-
 
|<span class="bold">Relevant Pages</span>: [[GetSoundProperty_(CMS)|getSoundProperty]] - [[SetSoundProperty_(CMS)|setSoundProperty]] - [[StartSound_(CMS)|startSound]] - [[StopSound_(CMS)|stopSound]] - [[ToggleSoundPause_(CMS)|toggleSoundPause]]
 
|<span class="bold">Relevant Pages</span>: [[GetSoundProperty_(CMS)|getSoundProperty]] - [[SetSoundProperty_(CMS)|setSoundProperty]] - [[StartSound_(CMS)|startSound]] - [[StopSound_(CMS)|stopSound]] - [[ToggleSoundPause_(CMS)|toggleSoundPause]]
 
|}
 
|}

Revision as of 16:26, 22 March 2014

Function History

Available since v3.8


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:

getSoundId("filename")


-- let's store the sound ID into a variable for later use
local soundID = getSoundId("sounds/example.ogg")


Arguments

filename: path
The path to the audio file whose ID we want to obtain! ("path/filename.type")


Flags

none


Return

id
Returns the sound ID as an integer value.

Relevant Pages: getSoundProperty - setSoundProperty - startSound - stopSound - toggleSoundPause