Stop Music

Stop playing music

Description

'stop music [music_id] [with fade <time>]'

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

Action ID: Stop

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

Requires User Interaction: No

Parameters

Name
Type
Description

music_id

string

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

fade

number

Optional. Fade out time in seconds.

Examples

Stop a Specific Music

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

monogatari.script({
    'Start': [
        'play music mainTheme with loop',
        'play music mystery with loop',
        'Two songs are currently playing',
        'stop music mainTheme',
        'Only the mystery song is playing now',
        'end'
    ]
});

Stop All Music

The following will stop all music currently playing.

Fade Out Effect

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

Fade Out All Music

  • Play Music - Play background music

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

Last updated

Was this helpful?