About the Behavior Editor

To write or edit your scripts, you can add your JavaScript code (ECMAScript) in the Behavior Editor.

If you need information about JavaScript classes, methods, or attributes, you can use the JavaScript API guide. To open this guide in your web browser, click JavaScript API Guide from the Storytelling section of the action bar.

See Also
Creating Scripts

Each number identifies a specific area in the Behavior Editor. Areas are described in the following table.

Number Feature Description
1 Script List

Lets you create and manage scripts.

Scripts are saved when you click outside the editor to change the focus.

Color coding indicates the status of each script:

  • Red: Your script is saved but it contains syntactical errors.
  • Orange: Any modification to the script remains unsaved as the editor is given the focus. Errors may be detected.
  • Green: Your script is saved and no error is detected.

2 Editor Defines the area where you edit your code.
Notes:
  • Your code is automatically saved.
  • Errors are automatically detected in your code.
  • When you start typing your code, the editor provides possible completions.
3 Menu Contains the following functionality:
  • Maximize: Enlarges or reduces your window.
  • Search: Lets you search and replace items in the editor.
  • Command Palette: Lets you access internal commands available in the editor. Shortcuts are also provided.
  • Open JavaScript API Guide: Opens the JavaScript API guide in a web browser.

For more information, see the Visual Studio Code guide.

4 Minimap Provides an overview of your code.
Note: You can scroll the minimap to view specific block codes in the editor.
5 Capacities Lets you create and edit your own capacities and properties.