|
|
(4 intermediate revisions by 2 users not shown) |
Line 1: |
Line 1: |
− | <div class="toccolours mw-collapsible mw-collapsed" style="background: #f0f0f0; border: 1px dashed darkgrey" width="100%">
| + | #REDIRECT [[Global Command: getSoundId]] |
− | <b>Command History</b>
| |
− | <div class="mw-collapsible-content">
| |
− | <div style="background:#ebebeb" width="100%">Available since <span style="color:orange">v3.8</span></div>
| |
− | </div></div>
| |
− | | |
− | | |
− | 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:
| |
− | <syntaxhighlight>
| |
− | getSoundId("filename")
| |
− | </syntaxhighlight>
| |
− | | |
− | | |
− | <syntaxhighlight>
| |
− | -- let's store the sound ID into a variable for later use!
| |
− | local soundID = getSoundId("sounds/example.ogg")
| |
− | </syntaxhighlight>
| |
− | | |
− | | |
− | | |
− | <b><u>Arguments</u></b>
| |
− | | |
− | <b>filename</b>: path <br/>
| |
− | The path to the audio file whose ID we want to obtain! ("path/filename.type")
| |
− | | |
− | | |
− | <b><u>Flags</u></b>
| |
− | | |
− | none
| |
− | | |
− | | |
− | <b><u>Return</u></b>
| |
− | | |
− | <b>id</b> <br/>
| |
− | Returns the sound ID as an integer value.
| |
− | {{i18n|GetSoundId}} <br/>
| |
− | {| style="background: #f0f0f0; border: 1px dashed darkgrey" width="100%"
| |
− | |-
| |
− | |<b>Relevant Pages</b>: [[GetSoundProperty|getSoundProperty]] - [[SetSoundProperty|setSoundProperty]] - [[StartSound|startSound]] - [[StopSound|stopSound]] - [[ToggleSoundPause|toggleSoundPause]]
| |
− | |}
| |