Stop Voice

Description

1
'stop voice [voice_id] [with [properties]]'
Copied!
The stop voice action will let you stop either all voices currently playing or only one in specific. To learn more about voices, read the Play Voice documentation.
Action ID: Voice::Stop
Reversible: Yes
Requires User Interaction: No

Parameters

Name
Type
Description
voice_id
string
Optional. The name of the specific voice 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 voice action.
Name
Type
Description
fade
number
The fade property let's you add a fade out effect to the voice, it accepts a time in seconds, representing how much time you want it to take until the voice volume is zero.

Examples

Stop a specific Voice

The following will stop a specific voice, identified by it's name.
Script
Voice Assets
1
Monogatari.script ({
2
'Start': [
3
'play voice dialog_002 with loop',
4
'The previous voice will be repeating itself over and over',
5
'play voice dialog_001',
6
'Two voices are currently playing',
7
'stop voice dialog_002',
8
'Now the first one has stopped and the second one will stop as soon as it ends',
9
'end'
10
]
11
});
Copied!
1
Monogatari.assets ('voice', {
2
'dialog_001': 'dialog_file_1.mp3',
3
'dialog_002': 'dialog_file_2.mp3'
4
});
Copied!

Stop all Voices

The following will stop all sounds currently playing.
Script
Voice Assets
1
Monogatari.script ({
2
'Start': [
3
'play voice dialog_002 with loop',
4
'The previous voice will be repeating itself over and over',
5
'play voice dialog_001',
6
'Two voices are currently playing',
7
'stop voice',
8
'No voice is playing now',
9
'end'
10
]
11
});
Copied!
1
Monogatari.assets ('voice', {
2
'dialog_001': 'dialog_file_1.mp3',
3
'dialog_002': 'dialog_file_2.mp3'
4
});
Copied!

Fade Out Effect

The following will stop the voice, and will use a fade out effect to do so. You can also use a fade out effect when stopping all voices.
Script
Voice Assets
1
Monogatari.script ({
2
'Start': [
3
'play voice dialog_002 with loop',
4
'The previous voice will be repeating itself over and over',
5
'play voice dialog_001',
6
'Two voices are currently playing',
7
'stop voice dialog_002 with fade 12',
8
'Now the first will be slowly stopped and the second one will stop as soon as it ends',
9
'end'
10
]
11
});
Copied!
1
Monogatari.assets ('voice', {
2
'dialog_001': 'dialog_file_1.mp3',
3
'dialog_002': 'dialog_file_2.mp3'
4
});
Copied!
Last modified 2yr ago