Skip to content

Script Studio ​

Open Scripts in the workspace tabs. This is the text editor for OpalScript — New Behavior, paste a class, Save & Apply, attach, Play.

Highlighting, completions, and the language worker ship with Opal. Switching scripts or reopening the workspace restores cursor, selection, and scroll for this Studio session. If the enhanced editor cannot load, the basic text editor still supports editing and Save & Apply.

Layout ​

AreaPurpose
Script listProject scripts, templates, Behavior Components, Flow nodes
EditorOpalScript (.ops) or opal.component / opal.flowNode source
Docs drawerReference, Tutorials, and tool panels
ValidationCompile diagnostics; a bad edit does not replace a last-known-good build

Typing keeps a local draft with live diagnostics. Pausing does not save or apply it. Save & Apply, Cmd/Ctrl+S, or Cmd/Ctrl+Enter commits it. Leaving the editor or switching scripts also flushes the current draft.

OpalScript files use .ops (.recovery.ops for last-known-good sources in project folders). Game and scene exports use .opal; reusable script libraries use .opal-script. Existing project folders adopt .ops on their next save.

Commands ​

Open Commands in the explorer or press Cmd/Ctrl+Shift+P. Arrow keys choose a result, Enter runs it, Escape returns to editing. Actions that need an open script stay disabled until one is open.

ChordAction
Cmd/Ctrl+PSearch files
Cmd/Ctrl+S or Cmd/Ctrl+EnterSave & Apply the active script
F2Rename the filename

The palette, file menus, and toolbar share the same actions. New Behavior starts an OpalScript class … : Component with empty Start and Update. Paste a spinner from High-level scripting over that starter.

Reading the scripting manual ​

Click Manual above the source, or Scripting manual in the bottom bar. The manual docks below the code. Reference opens the Full API: the same class-by-class catalog as the website, with properties, methods, events, lifecycle hooks and examples. Search for a class or member, or switch the filter to Language, Flow scripting or This project. Tutorials contains complete recipes; start with Jump with Space for input and physics setup.

Tutorials start in the Scripting category. Other categories include editor and gameplay guides.

Use Expand reading area for more height and Restore height to return to the split view. Click Scripting manual again to collapse the dock. Reading position, code selection, and editor undo stay intact. Arrow keys switch Reference and Tutorials; Commands can find the manual by searching for manual, reference, or tutorials.

Insert example replaces the current selection. Select all of a starter class before inserting a complete example, or you nest a class inside a class.

Definitions ​

Script Studio → Definitions creates and edits .opdef files from compiled record types. See typed gameplay and data.