Monogatari Documentation
HomepageGitHubDiscordTwitter
v1.3.0
v1.3.0
  • Getting Started
  • Configuration
    • Internationalization
    • Saving
    • Skip Main Menu
  • Design
    • CSS Classes
    • HTML Data Attributes
    • Icons
    • Image Menus
  • Port
    • Ren'py
  • Release
    • Chrome App
    • Desktop
    • Mobile
    • Web
  • Script
    • Audio
    • Characters
    • Choices
    • Images
    • Input
    • JavaScript
    • Labels
    • Messages
    • Notifications
    • Particles
    • Scenes
    • Split Files
    • Storage
    • Text
    • Vibration
    • Video
Powered by GitBook
On this page

Was this helpful?

  1. Script

Labels

Labels are just like the book's chapters, they define parts in your game. Take a look at this sample script:

var script = {
    "Start":[
        "This is a statement."
    ]
}

See that "Start" string? That's how a label is defined. Your game will always start in that "Start" label and every game must have one.

Inside it, you'll see a statement, which are the lines that tell your story and the way you'll do many things. As labels are as chapters, you can have as many as you want!

var script = {
    "Start":[
        "This is a statement.",
        "jump mylabel"
    ],
    "mylabel":[
        "This is another statement.",
        "Pretty easy huh?"
    ]
}

See that "jump mylabel"? that's how you can change between labels, the jump statement will take you to the label you give it.

PreviousJavaScriptNextMessages

Last updated 6 years ago

Was this helpful?