Skip to reading
PCA Script Programming

resume_sound()

Edition 0.86.4.1 HF1

0.86.4.1 Hotfix 1 edition. Earlier lessons and screenshots retain their original version context; revised references and supplements describe the newer behavior.

Download PDFView PDF page

Sound: Resume | Action ID: ResumeSound

Resume paused effects selected by channel.

Source table from resume_sound(), page 195
Option key / fieldMeaning and accepted inputDefault
Channel / ID (empty = all) channelSound-effect channel name. Reuse it to pause, stop or fade that sound group. May be blank.Blank

Timing. The call waits for its runtime routine to return; no additional completion wait is promised by this schema.

Code example
resume_sound({"channel": "puzzle"})

In use. Resume the machine channel together with the machine's motion. It resumes existing players; it does not choose or reload an audio asset.

fade_sound()#

Sound: Fade | Action ID: FadeSound

Fade a sound channel to a normalized volume over time, waiting for the fade routine.

Source table from resume_sound(), page 195
Option key / fieldMeaning and accepted inputDefault
Channel / ID (empty = all) channelSound-effect channel name. Reuse it to pause, stop or fade that sound group. May be blank.Blank
Target Volume volumeNormalized target volume: 0 is silent, 1 is full volume. Range: 0.0 to 1.0.0.0
Duration (seconds) durationTime in seconds for this action. Read its timing note before assuming it waits. Range: 0.0 to 60.0.1.0

Timing. Waits for the fade routine.

Code example
fade_sound({"channel": "puzzle", "volume": 0.0, "duration": 1})

In use. Fade ambience to 0 over 1.5 seconds before stopping it. Volume uses 0 to 1, not decibels. A final volume near zero stops the selected sound players.

Page 195 of 357Permalink
Go to page