Skip to main content

First Script

Writing Your First Message​

In the Web Editor​

  1. Open the Developers Portal and create a new project

  2. The editor opens with a starting chapter already created β€” this Start node is the entry point of your story

  3. The starting node is a good place to declare variables. Create a new chapter by clicking the + button in the sidebar, and add your first story node:

    title: my_first_node
    checkpoint_name: "Beginning"
    ---
    Hello, I'm your first message
    -> And I'm your first button

    I can help you write stories!

    ===
  4. Go back to the Start chapter and link to your new node:

    title: Start
    is_entry_point: true
    ---
    // Declare your variables here
    <<declare $player_name = "Agent">>

    <<jump my_first_node>>
    ===
  5. Press the Play button (β–Ά) to test your story in the built-in debugger

Editor tips
  • Type \\ to quickly insert commands (e.g., \\wait, \\jump, \\declare)
  • Press - at the start of a line to auto-insert -> for options
  • Use Ctrl+B, Ctrl+I, Ctrl+U to format selected text
  • Press Ctrl+S to save your script
  • See the Web Editor section for all features

Using Local .yarn Files (Legacy)​

  1. Create a new script file: Create a new file named my_first_chapter.yarn.

  2. Create your first node:

    title: my_first_node
    ---
    Hello, I'm your first message
    -> And I'm your first button

    I can help you write stories!

    ===
  3. Save the file and open the start.yarn file.

  4. Link your new node by adding <<jump my_first_node>>:

    // Jump to your start node
    <<jump my_first_node>>
    ===

Uploading Your Story (Legacy)​

Legacy method

This section applies only if you are using the legacy method with local .yarn files. If you are using the web editor, your story is saved automatically β€” just click Save in the editor toolbar.

  1. Go to Developers Portal and create a new project.
  2. After creation, the web editor will open automatically β€” close the editor and return to the project page.
  3. Use the Update by .yarn option to upload your .yarn files.