Stop Sound

Stop playing sound effects

Description

'stop sound [sound_id] [with fade <time>]'

The stop sound action will let you stop either all sounds currently playing or only one in specific. To learn more about sounds, read the Play Sound documentation.

Action ID: Stop

Reversible: Yes (restores the previously playing sounds from history)

Requires User Interaction: No

Parameters

Name
Type
Description

sound_id

string

Optional. The name of the specific sound you want to stop. If omitted, all sounds will be stopped.

fade

number

Optional. Fade out time in seconds.

Examples

Stop a Specific Sound

The following will stop a specific sound, identified by its name.

monogatari.script({
    'Start': [
        'play sound night with loop',
        'play sound fireCracks with loop',
        'Two sounds are currently playing',
        'stop sound fireCracks',
        'I guess someone put out the fire, only the night sounds are heard now',
        'end'
    ]
});

Stop All Sounds

The following will stop all sounds currently playing.

Fade Out Effect

The following will stop the sound with a fade out effect. You can also use a fade out effect when stopping all sounds.

Fade Out All Sounds

  • Play Sound - Play sound effects

  • Pause - Pause playing media (can be resumed later)

Last updated

Was this helpful?