GetSoundId
From The Official Visionaire Studio: Adventure Game Engine Wiki
Revision as of 21:27, 30 September 2014 by Vis apiuser (talk)
getSoundId
Available since: v4.0
Gets the sound ID of the specified sound if it is currently active.
Lua Syntax:
getSoundId(sounditem)
Arguments
sounditem
- "string" (string should contain 'vispath:' prefix) - Relative filename of sound.
Flags
Return Values
- soundID
- Unique id referencing the requested sound or -1 if the sound is not active.
Examples
Example 1:
-- store sound id of a currently active sound in a local variable
local soundID = getSoundId('vispath:sounds/example.ogg')