Gameplay: Audio, video, FMV and recorded gameplay
On this page
Sound effects, music, voice and video use separate playback routes. A sound channel gives you a handle for stopping, pausing or fading a group of effects. Starting playback usually lets the next instruction run immediately.
PlaySound()#
Play Sound
Start an imported audio asset as a sound effect, optionally on a named channel.
| Option key / field | Meaning and input | Default |
|---|---|---|
| Sound Asset assetId | Choose an imported audio asset. | Blank |
| Channel / ID channel | Sound-effect channel name. Reuse it to pause, stop or fade that sound group. | Blank |
Timing. Waits for the runtime routine to return; no further completion wait is promised by this schema.
await PlaySound({"assetId": "chime", "channel": "puzzle"})In use. Play chime on puzzle, then continue the list. Use that same channel to stop or fade the effect later. A blank channel has broader/default behavior; name important continuing sounds.
StopSound()#
Stop Sound
Stop effects selected by channel.
| Option key / field | Meaning and input | Default |
|---|---|---|
| Channel / ID channel | Sound-effect channel name. Reuse it to pause, stop or fade that sound group. | Blank |
Timing. Waits for the runtime routine to return; no further completion wait is promised by this schema.
await StopSound({"channel": "puzzle"})In use. Stop the machine channel when the power is cut. Use a specific channel so unrelated effects can continue. This does not stop music or voice.
