GetSoundId (CMS): Difference between revisions
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 ..." |
No edit summary |
||
| Line 6: | Line 6: | ||
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 | 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. | ||
| Line 16: | Line 16: | ||
<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 | ||
local soundID = getSoundId("sounds/example.ogg") | local soundID = getSoundId("sounds/example.ogg") | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Revision as of 17:09, 20 March 2014
Command 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.
|
日本語 – 正體中文 – 한국어 – Dansk – Deutsch – English – Español – Français – Italiano – Nederlands – Polski – Português – Svenska – Русский |
| Relevant Pages: getSoundProperty - setSoundProperty - startSound - stopSound - toggleSoundPause |