Difference between revisions of "GetSoundId (CMS)"
From The Official Visionaire Studio: Adventure Game Engine Wiki
Line 16: | Line 16: | ||
+ | Example: | ||
<syntaxhighlight> | <syntaxhighlight> | ||
-- let's store the sound ID into a variable for later use | -- let's store the sound ID into a variable for later use |
Revision as of 18:07, 28 September 2014
Function History |
---|
Available since v4.0 |
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")
Example:
-- let's store the sound ID into a variable for later use
local soundID = getSoundId("vispath:sounds/example.ogg")
Arguments
filename: path
The path to the audio file whose ID we want to obtain; vispath: must be included at the beginning of the path.
"vispath:path/filename.type"
Flags
none
Return
id
Returns the sound ID as an integer value.
Relevant Pages: getSoundProperty - setSoundProperty - startSound - stopSound - toggleSoundPause |