Script panel



The script panel includes a text area with syntax highlighting for editing rubescript, and a script output area to display any results or error messages. You can run scripts to manipulate items in the scene. Script execution can be undone and redone.

Each open scene in the workspace holds its own script, so when changing the active editor view to a different scene, the contents of the script panel will change to show the script for the active scene.

Code edit area
The upper part of the script panel is for editing the script. By default the script is shown using colors to highlight keywords and comments to improve readability. For very large scripts this can be slow, so if necessary you can turn it off under the Debug tab of the Options dialog.

Script output area
The script output area displays any messages you output in your script using the print function. It also displays any warnings or errors that occcurred while compiling the script. Here is a simple script which attempts to find a body called 'carBody' and move it to the cursor position.

The first of these images shows an error message generated by Angelscript, and signifying that the script could not be compiled. The offending line is highlighted in the code edit area, and the Status button icon is changed.

In the second image the script has now been compiled and run, but the desired body was not found. Warnings are shown in orange, and normal text output from the script is shown in blue.

In the third image, the script has now been compiled and run successfully.


The script library
As of version 1.4 multiple scripts can be edited in the script panel, and scripts can be set up to be triggered by various events. See the Managing scripts topic for more details.