Difference between revisions of "GetSoundId"

From The Official Visionaire Studio: Adventure Game Engine Wiki
Line 6: Line 6:
  
  
Use this to store the sound.id for an audio file into a variable, which you can use for stopping/pausing said sound or editing the 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!
  
  

Revision as of 22:38, 13 March 2013

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.


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