Stop Music
Stop playing music

Description

1
'stop music [music_id] [with [properties]]'
Copied!
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: Music::Stop
Reversible: Yes
Requires User Interaction: No

Parameters

Name
Type
Description
music_id
string
Optional. The name of the specific music you want to stop.
properties
string
Optional. A list of comma separated properties with their respective value.

Properties

The following is a comprehensive list of the properties available for you to modify certain behaviors of the stop music action.
Name
Type
Description
fade
number
The fade property let's you add a fade out effect to the music, it accepts a time in seconds, representing how much time you want it to take until the music volume is zero.

Examples

Stop a specific Music

The following will stop a specific music, identified by it's name.
Script
Music Assets
1
Monogatari.script ({
2
'Start': [
3
'play music mainTheme loop',
4
'play music mistery loop',
5
'Two songs are currently playing',
6
'stop music mainTheme',
7
'Only the mistery song is playing now',
8
'end'
9
]
10
});
Copied!
1
Monogatari.assets ('music', {
2
'mainTheme': 'mainThemeSong.mp3',
3
'mistery': 'misterious_song.ogg'
4
});
Copied!

Stop all Music

The following will stop all music currently playing
Script
Music Assets
1
Monogatari.script ({
2
'Start': [
3
'play music mainTheme loop',
4
'play music mistery loop',
5
'Two songs are currently playing',
6
'stop music',
7
'No music is playing anymore',
8
'end'
9
]
10
});
Copied!
1
Monogatari.assets ('music', {
2
'mainTheme': 'mainThemeSong.mp3',
3
'mistery': 'misterious_song.ogg'
4
});
Copied!

Fade Out Effect

The following will stop the song, and will use a fade out effect to do so. You can also use a fade out effect when stopping all music.
Script
Music Assets
1
Monogatari.script ({
2
'Start': [
3
'play music mainTheme loop',
4
'play music mistery loop',
5
'Two songs are currently playing',
6
'stop music mistery with fade 5',
7
'No music is playing anymore',
8
'end'
9
]
10
});
Copied!
1
Monogatari.assets ('music', {
2
'mainTheme': 'mainThemeSong.mp3',
3
'mistery': 'misterious_song.ogg'
4
});
Copied!
Last modified 2yr ago