Monogatari Documentation
HomepageGitHubDiscordTwitter
master
master
  • Welcome
  • Getting Started
    • Step 1: Setup Your Environment
    • Step 2: Download Monogatari
    • Step 3: Get Familiarized
    • Step 4: Make Your First Visual Novel
  • Upgrading from v1.4.1
  • F.A.Q.
  • Diagnosing Errors
  • Building Blocks
    • Script & Labels
    • Characters
    • Variables & Data Storage
    • Actions
      • Life Cycle
    • Components
      • Life Cycle
      • Built-in Properties
      • Built-in Functions
  • Script Actions
    • Choices
    • Clear
    • Conditionals
    • Dialogs
    • End
    • Gallery
    • Hide Canvas
    • Hide Character
    • Hide Image
    • Hide Particles
    • Hide Video
    • Input
    • Functions
    • Jump
    • Next
    • Placeholder
    • Play Music
    • Play Sound
    • Play Voice
    • Show Canvas
    • Show Background
    • Show Character
    • Show Image
    • Show Message
    • Show Notification
    • Show Particles
    • Show Scene
    • Show Video
    • Stop Music
    • Stop Sound
    • Stop Voice
    • Vibrate
    • Wait
  • Components
    • Credits Screen
    • Quick Menu
    • Loading Screen
    • Main Screen
    • Choice Container
    • Save Slot
    • Text-Box
  • Configuration Options
    • Game Configuration
      • Asset Preloading
      • Internationalization
      • Saving
      • Skip Main Menu
      • Storage
    • Player Preferences
    • Split Files
  • Style & Design
    • Responsiveness
    • CSS Classes
    • HTML Data Attributes
    • Icons
    • Image Menus
  • Releasing Your Game
    • Chrome App
    • Desktop App
    • Mobile
    • Web
  • Advanced: Monogatari Development
    • Core Libraries
      • Artemis
      • Kayros
      • Pandora
    • Actions
    • Components
    • Translations
    • Events
  • Releases
    • v2.0.0.alpha.8
    • v2.0.0.alpha.7
    • v2.0.0.alpha.6
    • v2.0.0.alpha.5
    • v2.0.0.alpha.4
    • v2.0.0.alpha.3
Powered by GitBook
On this page
  • Description
  • Parameters
  • Properties
  • Examples
  • Stop a specific Voice
  • Stop all Voices
  • Fade Out Effect

Was this helpful?

  1. Script Actions

Stop Voice

PreviousStop SoundNextVibrate

Last updated 4 years ago

Was this helpful?

Description

'stop voice [voice_id] [with [properties]]'

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.

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.

Monogatari.script ({
    'Start': [
        'play voice dialog_002 with loop',
        'The previous voice will be repeating itself over and over',
        'play voice dialog_001',
        'Two voices are currently playing',
        'stop voice dialog_002',
        'Now the first one has stopped and the second one will stop as soon as it ends',
        'end'
    ]
});
Monogatari.assets ('voice', {
    'dialog_001': 'dialog_file_1.mp3',
    'dialog_002': 'dialog_file_2.mp3'
});

Stop all Voices

The following will stop all sounds currently playing.

Monogatari.script ({
    'Start': [
        'play voice dialog_002 with loop',
        'The previous voice will be repeating itself over and over',
        'play voice dialog_001',
        'Two voices are currently playing',
        'stop voice',
        'No voice is playing now',
        'end'
    ]
});
Monogatari.assets ('voice', {
    'dialog_001': 'dialog_file_1.mp3',
    'dialog_002': 'dialog_file_2.mp3'
});

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.

Monogatari.script ({
    'Start': [
        'play voice dialog_002 with loop',
        'The previous voice will be repeating itself over and over',
        'play voice dialog_001',
        'Two voices are currently playing',
        'stop voice dialog_002 with fade 12',
        'Now the first will be slowly stopped and the second one will stop as soon as it ends',
        'end'
    ]
});
Monogatari.assets ('voice', {
    'dialog_001': 'dialog_file_1.mp3',
    'dialog_002': 'dialog_file_2.mp3'
});
Play Voice documentation