DocsKitReference

Scripts

Laid out like Blender's Text Editor. A map's compiled scripts and globals read back as HaloScript, each with its type, parameters and statements, and the Kit reads the engine's function names from your game's own files. Find a script searches the list at the left, and icons tell scripts and globals apart.

The Scripts workspace: a list of scripts on the left and one script open in a text editor with line numbers and syntax colors.
A map's scripts and globals as HaloScript.
ControlDoes
New Script, the list's +Adds new_script_1, dormant, as a start
Compile, Ctrl+EnterCompiles every script and global, the way the Editing Kit's Tool does
Remove, RestoreLeaves the chosen one out of the map, or keeps it again. A new one simply goes
Export allEvery script and global as one file, Kit Exports/<map>/scripts.hsc
Line numbers, Syntax colorsTurn each on or off

An edited script's row turns the edited color, and editing it back to the map's text is no edit. An error shows at its line: the number goes red, its text is marked, and the message is under the editor, such as Line 3, column 5: fade_out takes another number of arguments than 3. The editor turns to the first script with an error.

A clean compile says so, such as Compiled: 476 scripts, 158 globals, 24,342 syntax nodes, and the map loads again with your scripts, so F5 plays them. Save Scenario keeps your edits. Compile Map compiles them into the map, and refuses scripts that don't compile. A recipe carries them, and a joiner's game compiles them the same way.

Names come from the scene as edited: a newly added trigger volume, a renamed cutscene flag, a camera point or a named object placement can be used directly in your scripts. See Markers for what Play reloads and what needs a compiled map, and follow the trigger-volume tutorial for a complete example.

The compiler produces the same output as Tool: every installed map's scripts, read back and compiled again, match the map's own.