HaloScript is a scripting language that H1 map designers can use to have greater control over how their map works. It is primarily used in controlling the mission structure of singleplayer maps, but can also be used to achieve certain effects in multiplayer, though AI is not synchronized.
To learn HaloScript basics see our introduction page and a list of gotchas and limits. Reading the stock campaign scripts included with the H1A mod tools can also be a great way to learn.
Compiling scripts into a scenario
Scripts source files end with .hsc
and live in a data\...\your_level\scripts
folder. You're limited with the number and size of these files. With the newer H1A modding tools these scripts will be automatically compiled and added to the processed scenario tag when the level is loaded with the tools or built into a map.
Users of the legacy HEK must instead use Sapien to compile scripts before they will take effect.
Extensions
Advanced users may be interested in the Halo Script Preprocessor, which allows you to use C-like preprocessor directives like #define
. Modders targeting OpenSauce also have access to additional non-standard scripting functions, although some of these are now present in H1A.
HSC reference
To learn more about HSC's general syntax and execution model, see our cross-game scripting page.
Declaring scripts
Within a script source file you can delcare multiple scripts which contain a series of expressions. There are different types of scripts which run at different times:
Type | Comments | Example |
---|---|---|
continuous | Runs every tick (simulation frame of the engine), at 30 ticks per second. |
|
dormant | Sleeps until started with |
|
startup | Begins executing when the level initially loads and would be used for setting up AI alliances, running intro cinematics, and orchestrating the overall mission structure. You can have multiple startup scripts in the scenario. |
|
static | Performed when called from another script, possibly returning a value. These can be called as many times as needed and are run in the thread of the calling script. Static scripts are ideal for shared and reusable logic. In H1A these can support up to 16 parameters like later games. Parameters shadow any globals with the same name and cannot be modified. Outside H1A, you'll need to use globals to emulate parameters. |
|
stub | A The script you override a If you're familiar with C function prototypes, this is very similar. |
|
The number of scripts you can declare is limited.
Declaring globals
Globals are variables that can be read and set by your scripts. They exist for the lifetime of the level so can be used to store state related to a mission, or commonly used constant values that you want to declare once and reuse. Globals must be declared before they are used:
(global <value type> <name> <inital value>)
Globals for stock levels are typically declared in the base_*.hsc
file but used in the mission_*.hsc
and/or cinematics_*.hsc
files, but there is no requirement that you separate them this way. Here are some examples from a30's scripts:
(global long delay_calm (* 30 3)) ; 3 seconds
(global boolean global_rubble_end false)
(script dormant mission_rubble
; ...
(set global_rubble_end true)
)
(script dormant mission_river
; ...
(sleep delay_calm)
(if (and global_rubble_end global_cliff_end) (set play_music_a30_07 true))
)
The number of globals you can declare is limited.
Value types
Type | Details | Example |
---|---|---|
void | Void means "no value", used for the return type of functions or static scripts which are not meant to return anything, e.g. | N/A |
passthrough | This means the value type is passed through from an inner expression, used by | N/A |
boolean | A value that is either |
|
real | Floating point (decimal) value. Value Range: 3.4E +/- 38 (6 digits) |
|
short | 16-bit short integer value, stored in two's complement. Value Range: |
|
long | 32-bit long integer value, stored in two's complement. Value Range: |
|
string | String of characters in double quotes. Max number of characters: 32 |
|
trigger_volume | A "Trigger Volumes" value (a block in the scenario tag) | |
cutscene_flag | A "Cutscene Flags" value (a block in the scenario tag) | |
cutscene_camera_point | A "Cutscene Camera Points" value (a block in the scenario tag) | |
cutscene_title | A "Cutscene Titles" value (a block in the scenario tag) | |
cutscene_recording | A "Cutscene Recording" value that isn't in the public HaloCE scenario tag? | |
device_group | A "Device Groups" value (a block in the scenario tag) | |
ai | An "Encounters" value | |
ai_command_list | A "Command Lists" value (a block in the scenario tag) | |
starting_profile | A "Player Starting Profile" value (a block in the scenario tag) | |
conversation | A "AI Conversations" value (a block in the scenario tag) | |
navpoint | ||
hud_message | ||
object_list | A list of objects, such as players or AI actors. Once the list is created, it is semi-fixed but may shrink in size over time if objects are deleted from the world. For example, if you use Dead units will also still remain in the list and are counted by |
|
sound | ||
effect | ||
damage | ||
looping_sound | ||
animation_graph | ||
actor_variant | ||
damage_effect | ||
object_definition | ||
game_difficulty | easy, normal, hard, impossible | |
team | player, human, covenant, flood, sentinal | |
ai_default_state | none, sleeping, alert, moving, guarding, searching, fleeing | |
actor_type | ie, elite | |
hud_corner | top_left, top_ | |
object | ||
unit | ||
vehicle | ||
weapon | ||
device | ||
scenery | ||
object_name | An "Object Names" value (a block in the scenario tag) | |
unit_name | A "Bipeds" value (a block in the scenario tag) | |
vehicle_name | A "Vehicles" value (a block in the scenario tag) | |
weapon_name | A "Weapons" value (a block in the scenario tag) | |
device_name | A "Device" value (a block in the scenario tag) | |
scenery_name | A "Scenery" value (a block in the scenario tag) |
When to use short vs long
There are two integer variable types: short
and long
. Both hold whole numbers, but long
variables can hold much larger numbers than short
variables. It's worth noting both use the same amount of memory, so you should decide the type you use based on what range of values makes sense or the values the functions you call accept (avoids a cast). If you need to optimize memory usage you can use the bitwise functions to implement a bitfield.
Functions
Control
Control functions include waking and sleeping script theads and conditionally executing expressions.
See also advanced control methods.
Math
Other unsupported math operations can be built using functions the game does support.
Logic and comparison
These functions can be used to perform logical comparisons and bitwise integer operations. Bitwise functions are new to H1A only.
Function | |
---|---|
Returns true if all specified expressions are true. This function is short circuiting, meaning it will not evaluate subsequent expressions if a a prior one evaluates to | |
Returns the bitwise AND of two numbers. If a bit is | |
Uses the second argument as a mask to toggle bits on or off in the first argument. | |
Performs a bitwise left shift of a value by the given bit count. All bits are moved to the left by a number of positions, with the rightmost bits filling with 0's. Returns | |
Returns the bitwise OR of two numbers. If a bit is | |
Performs an unsigned right shift (also called logical or zero filling shift) of a value by the given bit count. All bits are moved to the right by a number of positions, with the leftmost bits filling with 0's. Returns | |
Returns the bitwise XOR (exclusive or) of two numbers. If a bit differs in both inputs, it is | |
Returns | |
Sets the value's bit at the given position on or off. | |
Returns true if two expressions are equal. | |
Returns true if the first number is larger than or equal to the second. | |
Returns true if the first number is larger than the second. | |
Returns true if the first number is smaller than or equal to the second. | |
Returns true if the first number is smaller than the second. | |
Returns true if two expressions are not equal. | |
Returns the opposite of the expression. | |
Returns true if any specified expressions are true. This function is short circuiting, meaning it will not evaluate subsequent expressions if a a prior one evaluates to |
Server functions
These functions apply to running a dedicated server or locally-hosted server for Custom Edition/PC retail.
Other functions
All other functions are used for debugging and gameplay scripting purposes, such as controlling AI, cinematics, checkpoints, and more.
Function | |
---|---|
Activates a nav point type | |
Activates a nav point type <string> attached to (local) player <unit> anchored to an object with a vertical offset <real>. If the player is not local to the machine, this will fail. | |
Activates a nav point type <string> attached to a team anchored to a flag with a vertical offset <real>. If the player is not local to the machine, this will fail. | |
Activates a nav point type <string> attached to a team anchored to an object with a vertical offset <real>. If the player is not local to the machine, this will fail. | |
turns all AI on or off. | |
Converts an ai reference to an object list | |
Creates an allegiance between two teams. The engine supports at most 8 allegiances at a time. | |
Returns whether two teams have an allegiance that is currently broken by traitorous behavior | |
Destroys an allegiance between two teams | |
Either enables or disables charging behavior for a group of actors | |
Either enables or disables automatic dormancy for a group of actors | |
Attaches the specified unit to the specified encounter | |
Attaches a unit to a newly created free actor of the specified type | |
Makes the specified platoon(s) go into the attacking state | |
Enables or disables a squad as being an automatic migration target | |
Forces a group of actors to start or stop berserking | |
Makes a group of actors braindead, or restores them to life (in their initial state) | |
Makes a list of objects braindead, or restores them to life. If you pass in a vehicle index, it makes all actors in that vehicle braindead (including any built-in guns). | |
Tells a group of actors to begin executing the specified command list | |
Tells a group of actors that are running a command list that they may advance further along the list (if they are waiting for a stimulus) | |
Just like ai_ | |
Tells a named unit to begin executing the specified command list | |
Gets the status of a number of units running command lists: 0 = none, 1 = finished command list, 2 = waiting for stimulus, 3 = running command list | |
Tries to add an entry to the list of conversations waiting to play. Returns FALSE if the required units could not be found to play the conversation, or if the player is too far away and the 'delay' flag is not set. | |
Tells a conversation that it may advance | |
Returns which line the conversation is currently playing, or 999 if the conversation is not currently playing. | |
Returns the status of a conversation (0=none, 1=trying to begin, 2=waiting for guys to get in position, 3=playing, 4=waiting to advance, 5=could not begin, 6=finished successfully, 7=aborted midway) | |
Stops a conversation from playing or trying to play | |
Focuses (or stops focusing) a set of unit vocalization types | |
Ignores (or stops ignoring) a set of AI communication types when printing out communications | |
Suppresses (or stops suppressing) a set of AI communication types | |
Drops the AI debugging sound point at the camera location | |
Makes the currently selected AI speak a vocalization | |
Makes the currently selected AI speak a list of vocalizations | |
Teleports all players to the specified encounter | |
Makes the selected AI vocalize | |
Makes the specified platoon(s) go into the defending state | |
Clears the selected encounter | |
Detaches the specified unit from all AI | |
Turns impromptu dialogue on or off. When off, units will still play some sounds (like when they take damage) but will not speak when exiting vehicles, seeing friends die, etc. | |
If true, forces all actors to completely disregard the specified units, otherwise lets them acknowledge the units again. | |
Erases the specified encounter and/or squad | |
Erases all AI | |
Tells a group of actors to get out of any vehicles that they are in | |
Sets the distance threshold which will cause squads to migrate when following someone | |
Sets the follow target for an encounter to be a group of AI (encounter, squad or platoon) | |
Turns off following for an encounter | |
Sets the follow target for an encounter to be the closest player. AI follow their target by moving to firing positions near their target with the same letter label. Note that the AI may need to be migrated to follow the player through multiple sets of firing positions. | |
Sets the follow target for an encounter to be a specific unit. | |
Forces an encounter to remain active (i.e. not freeze in place) even if there are no players nearby | |
Forces a named actor that is NOT in an encounter to remain active (i.e. not freeze in place) even if there are no players nearby | |
Removes a group of actors from their encounter and sets them free | |
Removes a set of units from their encounter (if any) and sets them free | |
Return the number of actors that are still trying to get into the specified vehicle | |
Tells a group of actors to get into a vehicle, in the substring-specified seats (e.g. passenger for pelican). Does not interrupt any actors who are already going to vehicles. You can test if a vehicle is flipped by calling this function, then in the same tick testing | |
Tells a group of actors to get into a vehicle, in the substring-specified seats (e.g. passenger for pelican). Any actors who are already going to vehicles will stop and go to this one instead! | |
Turns grenade inventory on or off | |
Returns whether a platoon is in the attacking mode (or if an encounter is specified, returns whether any platoon in that encounter is attacking) | |
Instantly kills the specified encounter and/or squad | |
Instantly and silently (no animation or sound played) kills the specified encounter and/or squad | |
Cycles through AI line-spray modes | |
Links the first encounter so that it will be made active whenever it detects that the second encounter is active | |
Return the number of living actors in the specified encounter and/or squad | |
Return the fraction | |
Tells an actor to look at an object until further notice | |
Makes one encounter magically aware of another | |
Makes an encounter magically aware of nearby players | |
Makes an encounter magically aware of the specified unit | |
Makes all squads in the specified platoon(s) maneuver to their designated maneuver squads | |
Enables or disables the maneuver/retreat rule for an encounter or platoon. The rule will still trigger, but none of the actors will be given the order to change squads. | |
Makes all or part of an encounter move to another encounter | |
Makes all or part of an encounter move to another encounter, and say their | |
Makes a named vehicle or group of units move to another encounter | |
Return the number of non-swarm actors in the specified encounter and/or squad | |
Places the specified encounter on the map | |
Sets an encounter to be playfighting or not | |
If true, ALL enemies will prefer to attack the specified units. If false, removes the preference. | |
Reconnects all AI information to the current structure bsp (use this after you create encounters or command lists in sapien, or place new firing points or command list points) | |
Refreshes the health and grenade count of a group of actors, so they are as good as new | |
Makes all squads in the specified platoon(s) maneuver to their designated maneuver squads | |
Selects the specified AI for use with AI debug functions like | |
Enables or disables sight for actors in the specified encounter | |
Sets the current state of a group of actors. WARNING: may have unpredictable results on actors that are in combat. | |
Enables or disables hearing for actors in the specified encounter | |
Enables or disables respawning in the specified encounter | |
Sets the state that a group of actors will return to when they have nothing to do | |
Makes an encounter change to a new team | |
Spawns a single actor in the specified encounter and/or squad | |
Returns the most severe combat status of a group of actors (0=inactive, 1=noncombat, 2=guarding, 3=search/suspicious, 4=definite enemy(heard or magic awareness), 5=visible enemy, 6=engaging in combat) | |
Tells an actor to stop looking at whatever it's looking at | |
Return the current strength (average body vitality from 0-1) of the specified encounter and/or squad | |
Return the number of swarm actors in the specified encounter and/or squad | |
Teleports a group of actors to the starting locations of their current squad(s) | |
Teleports a group of actors to the starting locations of their current squad(s), only if they are not supported by solid ground (i.e. if they are falling after switching BSPs). | |
makes a squad's delay timer expire and releases them to enter combat. | |
makes a squad's delay timer start counting. | |
Causes a group of actors to preferentially target another group of actors | |
Removes the preferential target setting from a group of actors | |
Causes a group of actors to preferentially target the player | |
Sets a vehicle to "belong" to a particular encounter/squad. Any actors who get into the vehicle will be placed in this squad. Vehicles potentially drivable by multiple teams need their own encounter! | |
Sets a vehicle as being impulsively enterable for a certain encounter/squad of actors | |
Sets a vehicle as being impulsively enterable for actors of a certain type (grunt, elite, marine etc) | |
Disables actors from impulsively getting into a vehicle (this is the default state for newly placed vehicles) | |
Sets a vehicle as being impulsively enterable for actors within a certain distance | |
Sets a vehicle as being impulsively enterable for actors on a certain team | |
On Xbox, this would trigger the "attract" videos to play when the main menu is left idle. Not applicable to PC. | |
Binds an input device/button combination to a game control | |
Returns true if breadcrumbs improved nav points are enabled. | |
Enables or disables breakability of all breakable surfaces in the level | |
Restores all breakable surfaces | |
Toggles script control of the camera | |
Moves the camera to the specified camera point over the specified number of ticks | |
Begins a prerecorded camera animation | |
Makes the scripted camera zoom out around a unit as if it were dead | |
Makes the scripted camera follow a unit | |
Moves the camera to the specified camera point over the specified number of ticks (position is relative to the specified object) | |
Returns the number of ticks remaining in the current camera interpolation | |
Change your team (0=red, 1=blue, else=auto). Removed in H1A. | |
Reloads the cheats.txt file | |
Gives the player active camouflage | |
Gives the player active camouflage | |
Drops all powerups near player. The set of powerups is controlled by the globals tag. | |
Drops all vehicles on player | |
Drops all weapons near player | |
Drops a warthog near player | |
Teleports player to camera location | |
Load a saved checkpoint | |
Save last solo checkpoint | |
Aborts a cinematic | |
Sets the convolution effect | |
Sets the filter effect | |
Sets the desaturation filter tint color | |
Sets the video effect: | |
Starts screen effect; pass true to clear | |
Returns control of the screen effects to the rest of the game | |
| |
Activates the chapter title | |
Activates the chapter title, delayed by <real> seconds | |
Sets or removes the letterbox bars | |
| |
| |
Initializes game to start a cinematic (interruptive) cutscene | |
Initializes the game to end a cinematic (interruptive) cutscene | |
Suppresses or enables the automatic creation of objects during cutscenes due to a bsp switch | |
Clears console output and tab completions from the screen. | |
Test function to configure a single control | |
Attempt to connect to server - use ip:port password as parameters | |
Loads debug game state from | |
Loads debug game state from | |
Loads debug game state from | |
Loads debug game state from | |
Saves debug game state to | |
Saves debug game state to | |
Crashes (for debugging) | |
Starts a custom animation playing on a unit (interpolates into animation if last parameter is true) | |
Starts a custom animation playing on a unit list (interpolates into animation if last parameter is true) | |
Causes the specified damage at the specified flag | |
Causes the specified damage at the specified object | |
Deactivates a nav point type attached to a player <unit> anchored to a flag | |
Deactivates a nav point type attached to a player <unit> anchored to an object | |
Deactivates a nav point type attached to a team anchored to a flag | |
Deactivates a nav point type attached to a team anchored to an object | |
Loads the saved camera position and facing | |
loads the camera position and facing from <name>_ | |
loads the camera position and facing from camera_ | |
loads the camera position and facing from a passed in string | |
Saves the camera position and facing | |
saves the camera position and facing to <name>_ | |
saves the camera position and facing to camera_ | |
Dumps memory leaks | |
Dumps memory leaks by source file | |
Dumps memory leaks from the specified source file | |
displays the current pvs. | |
Changes the minimum and maximum distances for all sound classes matching the substring | |
Enables or disabled all sound classes matching the substring | |
Changes the reverb level for all sound classes matching the substring | |
Writes all memory being used by tag files into tag_ | |
Given two local player indices, teleports the first to the second if they both exist. | |
Delete all custom profile files | |
Gets the current position of the given device (used for devices without explicit device groups) | |
Gets the current position of the given device (used for devices without explicit device groups) | |
Gets the current power of a named device | |
true allows a device to change states only once | |
Returns the desired value of the specified device group | |
Changes the desired value of the specified device group | |
Instantaneously changes the value of the specified device group | |
true makes the given device one-sided (only able to be opened from one direction), false makes it two-sided | |
true makes the given device open automatically when any biped is nearby, false makes it not | |
changes a machine's never_ | |
Set the desired position of the given device (used for devices without explicit device groups) | |
Instantaneously changes the position of the given device (used for devices without explicit device groups | |
Immediately sets the power of a named device to the given value | |
Disconnect from a server | |
Display in-game help dialog | |
Starts the specified effect at the specified flag | |
Starts the specified effect on the specified object at the specified marker | |
Starts/stops the help text flashing | |
Enables or disables the suppression of error spamming | |
Does a screen fade in from a particular color in the amount of ticks | |
Does a screen fade out to a particular color in the amount of ticks | |
Sets up a network server with the given map name, game variant, and true for remote connections, false for not | |
Returns false if there are bad guys around, projectiles in the air, etc. | |
Returns the current difficulty setting, but lies to you and will never return easy, instead returning normal | |
Returns the actual current difficulty setting without lying | |
Changes the difficulty setting for the next map to be loaded | |
| |
Returns true if the game is cooperative | |
Causes the player to revert to their previous saved checkpoint. For example, this is used when Keyes dies in Truth and Reconciliation. | |
Reverts to last saved game, if any (for testing, the first bastard that does this to me gets it in the head) | |
Don't use this for anything, you black-hearted bastards | |
Returns false if it would be a bad idea to save the player's game right now | |
Returns false if it would be a bad idea to save the player's game right now | |
Checks to see if it is safe to save game, then saves (gives up after 8 seconds) | |
Cancels any pending | |
Checks to see if it is safe to save game, then saves (this version never gives up) | |
Saves disregarding player's current situation | |
Checks to see if the game is trying to save a checkpoint | |
Skips <short> amount of game ticks. ONLY USE IN CUTSCENES!!! | |
Changes the game speed. Values above 20 are likley to be uncontrollable. This function doesn't have an effect in H1A but you can now use the | |
Gets ticks elapsed since the start of the game (when the map loaded). This is not authoritative game time in the case of multiplayer since clients can join at different times. | |
Sets the multiplayer game engine, which will take effect the next time the map is loaded with | |
Causes the player to successfully finish the current level and move on to the next | |
Causes all non-visible garbage objects like dead bipeds and garbage to be garbage collected (removed) immediately rather than on a timer. You can enable | |
Gets the amount of forward throttle applied by digital device stimuli | |
Gets the increment in pitch applied by digital device stimuli | |
Gets the amount of strafe throttle applied by digital device stimuli | |
Gets the increment in yaw applied by digital device stimuli | |
Gets the threshold beyond which gamepad movement is full forward throttle | |
Gets the scale for gamepad control of pitch | |
Gets the threshold beyond which gamepad movement is full strafe throttle | |
Gets the scale for gamepad control of yaw | |
Gets the threshold beyond which mouse movement is full forward throttle | |
Gets the scale for mouse control of pitch | |
Gets the threshold beyond which mouse movement is full strafe throttle | |
Gets the scale for mouse control of yaw | |
Gets the yaw rate for the given player number | |
Gets the yaw rate for the given player number | |
Hammers the server by connecting and disconnecting repeatedly | |
Stops hammering the server | |
Prints a description of the named function | |
Starts/stops manual blinking of the health panel | |
Starts/stops manual blinking of the motion sensor panel | |
Starts/stops manual blinking of the shield panel | |
Clears all non-state messages on the hud | |
Returns the ticks left on the hud timer | |
Resets the timer for the help text flashing | |
displays <message> as the help text | |
sets <message> as the current objective | |
sets the timer upper left position to (x, y)=>(<short>, <short>) | |
sets the time for the timer to <short> minutes and <short> seconds, and starts and displays timer | |
sets the warning time for the timer to <short> minutes and <short> seconds | |
hides/shows the weapon crosshair | |
hides/shows the health panel | |
hides/shows the motion sensor panel | |
hides/shows the shield panel | |
shit | |
shit | |
shit | |
shit | |
Activates an enumerated joystick into a logical joystick slot | |
Deactivates an enumerated joystick, freeing up the logical joystick slot | |
Test function that looks up a default profile for a deviceid | |
Test function to find a joystick by GUID (string representation) | |
Test function to return the number of joysticks enumerated | |
Test function to determine if an enumerated joystick is activated or not | |
Test function to show the enumerated joystick information for all joystick | |
Prints the value of an expression to the screen for debugging purposes. | |
Returns the number of objects in a list | |
returns the number of objects in a list that aren't dead | |
Returns an item in an object list | |
returns a list of the living player units on the local machine | |
prints a string to the hs log file. | |
Causes player's unit to start a melee attack | |
All units controlled by the player will assume the given seat name (valid values are 'asleep', 'alert', 'stand', 'crouch' and 'flee') | |
Loads a singleplayer map by scenario name. If using the H1A standalone build, which directly loads tags instead of cache files, use the scenario tag path instead. | |
Starts the map from the beginning | |
Signals a mission segment being reached to MCC. Usually done at the same time as a checkpoint ( | |
Clears network messaging metrics | |
Dumps network messaging metrics to given file ("" for default) | |
Changes the name of the multiplayer map | |
Dumps info on network client | |
Dumps info on network server | |
Clears the net_graph | |
Changes the net_graph display (bytes/packets, sent/received) | |
| |
Reset the timer | |
| |
Stop the timer | |
Attaches the second object to the first; both strings can be empty | |
Returns | |
Returns | |
Deletes all objects of type | |
Detaches from the given parent object the given child object | |
returns minimum distance from any of the specified objects to the specified flag. (returns -1 if there are no objects, or no flag, to check) | |
returns minimum distance from any of the specified objects to the specified destination object. (returns -1 if either of the objects does not exist) | |
debugs object memory usage | |
Loads textures necessary to draw objects that are about to come on-screen, using the object's predicted resources. | |
Makes an object use its highest quality LOD for the remainder of the levels' cutscenes. | |
Prevents an object from taking damage | |
Allows an object to take damage again | |
Creates an object from the scenario | |
Creates an object, destroying it first if it already exists | |
Creates anew all objects from the scenario whose names contain the given substring | |
Creates all objects from the scenario whose names contain the given substring | |
Destroys an object | |
Destroys all non player objects | |
Destroys all objects from the scenario whose names contain the given substring | |
Just another (old) name for object_ | |
Removes the special place that activates everything it sees. | |
Sets the specified cutscene camera point as the special place that activates everything it sees. | |
Sets the specified object as the special place that activates everything it sees. | |
| |
Turns the specified object in the direction of the specified flag | |
| |
Sets the desired region (use | |
| |
sets the scale for a given object and interpolates over the given number of frames to achieve that scale | |
Sets the shield vitality of the specified object (between 0 and 1) | |
Moves the specified object to the specified flag | |
Loads textures necessary to draw an object that's about to come on-screen | |
Pauses or unpauses the hud timer | |
Resets all physics constants to earthly values. | |
Get the current global gravity acceleration relative to Halo standard gravity. | |
Set global gravity acceleration relative to Halo standard gravity. The change in gravity is NOT network synchronized. | |
Starts game in film playback mode | |
Returns | |
Invert player0's look | |
Returns | |
returns a list of the players | |
returns a list of the living player units on the MP team | |
Resets zoom levels on all players | |
Returns | |
Returns | |
Returns | |
Returns | |
Returns | |
Returns | |
Returns | |
Returns | |
Returns | |
Returns | |
Returns | |
Returns | |
Resets the player action test state so that all tests will return | |
Returns | |
Adds/resets the player's health, shield, and inventory (weapons and grenades) to the named profile. Resets if third parameter is | |
Enables/disables camera control globally | |
| |
This is not a real HSC function, but rather a hard-coded alias for | |
| |
| |
| |
| |
Toggle player input. The player can still free-look, but nothing else. | |
Playback client input history starting from the specified last completed update id | |
Prints a string to the console. Printed text will not appear in the console unless devmode is enabled (devmode 4). You can give a | |
Prints a list of all input bindings | |
prints a string to the console if the condition is true. | |
Activates profile sections based on a substring | |
Deactivates profile sections based on a substring | |
Dumps profile based on a substring | |
Enables or disables profile graph display of a particular value | |
Load any included builtin profiles and create profiles on disk | |
Resets profiling data | |
Clears the timers that are present in the profiling service | |
Dumps the profiling service timers | |
Unlocks all the solo player levels for player 1's profile | |
Quits the game | |
tests sun occlusion at a point. | |
saves radiosity solution. | |
starts radiosity computation. | |
returns a random value in the range [lower bound, upper bound) | |
Destroys all dynamic and permanent decals. You shouldn't use this to optimize your map's framerate because it doesn't preserve decorative environmental decals. Instead, set reasonable lifetimes for your dynamic decals and limit the number of decals created by custom effects. | |
Set the ambient light value for fixed function. Removed in H1A since there is no longer a fixed function render pipeline. | |
Average fps | |
| |
| |
Check for shader changes | |
Sends a command for server to execute at console. Use " to send quotes. | |
returns a random value in the range [lower bound, upper bound) | |
Kill the specified unit's cutscene recording | |
Make the specified unit run the specified cutscene recording | |
Make the specified unit run the specified cutscene recording, deletes the unit when the animation finishes | |
Make the specified vehicle run the specified cutscene recording, hovers the vehicle when the animation finishes | |
Return the time remaining in the specified unit's cutscene recording | |
Reloads all shader_ | |
Displays the prediction stats of the specified remote player. | |
Render game effects if | |
Enables/disables dynamic lights | |
Starts a custom animation playing on a piece of scenery. | |
Starts a custom animation playing on a piece of scenery at a specific frame. | |
Returns the number of ticks/frames remaining in a custom animation (or zero, if the animation is over). This function intentionally returns a value 2 frames lower than the actual remaining frame count so scripts waiting for the animation to end can do something before it's over. | |
Takes a cubemap screenshot from the camera's point of view and saves as | |
Saves a file called hs_ | |
Recompiles scripts | |
Sets a screen effect script value | |
Sets the value of a defined global variable. | |
Sets the amount of forward throttle applied by digital device stimuli | |
Sets the increment in pitch applied by digital device stimuli | |
Sets the amount of strafe throttle applied by digital device stimuli | |
Sets the increment in yaw applied by digital device stimuli | |
Sets the threshold beyond which gamepad movement is full forward throttle | |
Sets the scale for gamepad control of pitch | |
Sets the threshold beyond which gamepad movement is full strafe throttle | |
Sets the scale for gamepad control of yaw | |
Set the gamma. Removed in H1A. | |
Sets the threshold beyond which mouse movement is full forward throttle | |
Sets the scale for mouse control of pitch | |
Sets the threshold beyond which mouse movement is full strafe throttle | |
Sets the scale for mouse control of yaw | |
Sets the yaw rate for the given player number | |
Sets the yaw rate for the given player number | |
Shows or hides the hud | |
Shows or hides the hud help text | |
Displays the hud timer | |
Shows update history playback stats | |
| |
| |
Changes the gain on the specified sound class(es) to the specified game over the specified number of ticks. | |
Returns true if EAX extensions are enabled | |
Enables or disables all sound | |
Enable or disable EAX extensions | |
Enable or disable hardware sound buffers | |
Returns the game's effects gain | |
Absolutely do not use this either | |
Returns the game's master gain | |
Returns the game's music gain | |
Get the amount of supplementary buffers | |
Loads an impulse sound into the sound cache ready for playback | |
Plays an impulse sound from the specified source object (or "none"), with the specified scale. Note that the sound may not play under certain situations, like if its sound class is scripted_ | |
Stops the specified impulse sound | |
Returns the time remaining for the specified impulse sound | |
| |
Enables or disables the alternate loop/alternate end for a looping sound | |
Changes the scale of the sound (which should affect the volume) within the range 0 to 1 | |
Plays a looping sound from the specified source object (or "none"), with the specified scale | |
Stops the specified looping sound | |
Set the game's effects gain | |
Change environment preset | |
Set the DSound factor value | |
Absolutely do not use this | |
Set the game's master gain | |
Set the game's music gain. This should be in the range 0-1. Setting it outside this range will crash Standalone. | |
Set the DSound rolloff value | |
Set the amount of supplementary buffers | |
Returns the current structure bsp index | |
Places lens flares in the structure bsp | |
Switches to a different structure bsp | |
Prints the specified boolean with the format | |
Prints the specified real with the format | |
Don't make me kick your ass | |
Sleeps the calling thread for the specified number of ms. | |
Resets the time code timer | |
Shows the time code timer | |
Starts/stops the time code timer | |
Sets the name of the remote player whose position update are to be tracked. | |
| |
Unbinds an input device/button combination | |
Converts an object to a unit | |
Sets a group of units' current body and shield vitality | |
Sets the units' desired flashlight state | |
Sets a group of units' maximum body and shield vitality | |
Allows a unit to aim in place without turning | |
Allows a unit to blink or not (units never blink when they are dead) | |
Closes the hatches on a given unit | |
Starts a custom animation playing on a unit at a specific frame index (interpolates into animation if next to last parameter is | |
Prevents any of the given units from dropping weapons or grenades when they die | |
Puts the specified unit in the specified vehicle (in the named seat) | |
Makes a unit exit its vehicle | |
Gets the unit's current flashlight state | |
Returns the number of ticks remaining in a unit's custom animation (or zero, if the animation is over). This function intentionally returns a value 2 frames lower than the actual remaining frame count so scripts waiting for the animation to end can do something before it's over. | |
Returns the health of the given unit as a | |
Returns the shield of the given unit as a | |
Returns the total number of grenades for the given unit, or 0 if the unit does not exist. | |
Returns | |
Returns | |
Prevents any of the given units from being knocked around or playing ping animations | |
Returns | |
Kills a given unit, no saving throw. This will crash pre-H1A MCC versions of the game if the unit doesn't exist. | |
Kills a given unit silently (doesn't make them play their normal death animation or sound). This will crash pre-H1A MCC versions of the game if the unit doesn't exist. | |
Opens the hatches on the given unit | |
Sets a unit's current body and shield vitality | |
Turns the unit's flashlight on or off | |
Sets a unit's facial expression (-1 is none, other values depend on unit) | |
Sets the emotion animation to be used for the given unit | |
Can be used to prevent the player from entering a vehicle | |
Sets a unit's maximum body and shield vitality | |
This unit will assume the named seat | |
Returns whether the night-vision mode could be activated via the flashlight button | |
Stops the custom animation running on the given unit | |
Stops gravity from working on the given unit | |
Returns the driver of a vehicle | |
Returns the gunner of a vehicle | |
Stops the vehicle from running real physics and runs fake hovering physics instead | |
Makes a list of units (named or by encounter) magically get into a vehicle, in the substring-specified seats (e.g. "CD-passenger". Empty string matches all seats). | |
Returns a list of all riders in a vehicle | |
Tests whether the named seat has a specified unit in it. This accepts a seat label which is not case sensitive. | |
Tests whether the named seat has an object in the object list. This accepts a seat label which is not case sensitive. | |
Makes units get out of a vehicle from the substring-specified seats (e.g. "CD-passenger". Empty string matches all seats). The seat label is not case sensitive. | |
Prints the build version | |
Moves all players outside a specified trigger volume to a specified flag | |
Returns | |
Returns | |
Returns |
External globals
External globals are globals which belong to the engine itself, as opposed to declared in level scripts, are are typically used to toggle debug features. If manipulating them via scripts, you need to use set
. From the console you can just set them like this:
rasterizer_fog_atmosphere false
Global | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
If enabled, the ballistic arc drawn by | |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
When an encounter is selected, damage modifiers are logged at the bottom of the screen. | |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
Displays red text over AI whenever they vocalize, with the name of the dialogue field played. For example, | |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
Prints vocalizations to the console as they happen, including the encounter, squad, actor, dialogue type (e.g. exclaim), and line. For example, | |||||||||||||||
| |||||||||||||||
| |||||||||||||||
Toggles the display of any enabled AI debug overlays. Defaults to | |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
Toggles the rendering of ballistic aiming arcs when AI throw grenades only (does not include hunter guns, wraiths, or other ballistic weapons). The arc is shown in green when unobstructed and orange when obstructed by an object or the BSP. Its origin point and vector are shown in yellow. Only a single arc is shown at a time and updates whenever a new grenade is thrown. This can be paused with | |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
Shows pink text overlays over each unit with dialogue showing which variant they use, like if marines are a "mendoza" or a "bisenti". For example, | |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
Toggles the display of how many props each actor has in green. If | |||||||||||||||
Hides prop lines for friends if enabled, which can make seeing enemy props easier. | |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
Toggles the display of props as a web of lines. | |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
Displays debug information in the bottom left with the current counts for swarms and swarm component datum arrays. Swarms are groups of Flood infection forms while components are individual infection forms. | |||||||||||||||
| |||||||||||||||
| |||||||||||||||
Unknown purpose. Default value is 7. | |||||||||||||||
Enables on-demand/revised nav points like MCC. Off by default. Newly added to the MCC tools in the July 2023 CU. | |||||||||||||||
Enables or disables the breakable surfaces effect. If disabled, breakable surfaces will simply disappear rather than shatter. | |||||||||||||||
Prevents player weapons from generating heat and depleting ammo rounds. Battery will still be depleted. | |||||||||||||||
Allows the player to "possess" other characters by walking into them. The player will then be able to control the possessed character and see the world from its view. | |||||||||||||||
If enabled, the game loads a | |||||||||||||||
Prevents players from being killed, including all multiplayer clients if enabled on the server. Although the players can still take damage, being reduced to 0 health or falling long distances will not kill them. This also prevents players from being killed with | |||||||||||||||
Prevents weapons from depleting battery or reserve ammo. Weapons will still generate heat. Magazine-based weapons will still empty their current magazine, but reloading will not use up any reserve ammo. | |||||||||||||||
If enabled, players take no fall damage. In MCC, holding crouch while mid-air will also cause the player to hover and holding jump will cause you to fly. | |||||||||||||||
Causes enemy AI to be killed instantly if they "look" at or become aware of the player. This does not include allies like Marines, even after allegiance has been broken by killing them. It is unknown if the command is hard-coded to kill certain AI types. | |||||||||||||||
The player will instantly kill any unit they damage, including destroying vehicles. Even multiplayer vehicles can be "killed" and rendered inoperable. | |||||||||||||||
Any damage_ | |||||||||||||||
Players jump to an extreme height, and will die of fall damage if | |||||||||||||||
Unknown purpose. | |||||||||||||||
Unknown purpose. May be used to limit how many total actions from clients are allowed to be queued on the server. Defaults to | |||||||||||||||
Unknown purpose. May be used to limit how long actions from clients are allowed to be queued on the server before they are ignored. Defaults to | |||||||||||||||
If enabled, a ray is continually shot from the camera (by default) to troubleshoot ray-object and ray-BSP collisions. A red normal-aligned marker will be shown where the ray collides with a surface. The collision surface itself, whether BSP or model, will be outline in red. Information about the collision surface will be shown in the top left corner of the screen, including plane and surface indices from the BSP structure, material type, and how many degrees the surface's normal differs from vertical. The types of surfaces which the test ray hits or ignores can be toggled with the This feature can be frozen in place with | |||||||||||||||
Toggles the display of collision features near the camera, which can be spheres (red), cylinders (blue), or prisms (green). Collision size can be adjusted with | |||||||||||||||
When | |||||||||||||||
When | |||||||||||||||
Toggles if collision debug rays ignore breakable surfaces. Defaults to | |||||||||||||||
Toggles if collision debug rays ignore invisible surfaces (e.g. collision-only player clipping). Defaults to | |||||||||||||||
Toggles if collision debug rays ignore two-sided surfaces. Defaults to | |||||||||||||||
Toggles if collision debug rays collide with water surfaces. | |||||||||||||||
Toggles if collision debug rays collide with any class of object's collision geometry. This setting will be ignored if any more specific object flag is enabled, such as | |||||||||||||||
Toggles if collision debug rays collide with bipeds. | |||||||||||||||
Toggles if collision debug rays collide with device_ | |||||||||||||||
Toggles if collision debug rays collide with equipment. | |||||||||||||||
Toggles if collision debug rays collide with device_ | |||||||||||||||
Toggles if collision debug rays collide with device_ | |||||||||||||||
Toggles if collision debug rays collide with placeholders. This would require a custom placeholder to have an effect, since the placeholder tags that come with the HEK have no collision model. | |||||||||||||||
Toggles if collision debug rays collide with projectiles. Note that most projectiles do not have a collision model. | |||||||||||||||
Toggles if collision debug rays collide with scenery. | |||||||||||||||
Toggles if collision debug rays collide with vehicles. | |||||||||||||||
Toggles if collision debug rays collide with weapons. | |||||||||||||||
Unknown purpose. Does not seem to affect collision ray tests against bipeds. | |||||||||||||||
Toggles if collision debug rays collide with the structure BSP. Collisions with model_ | |||||||||||||||
Unknown purpose. | |||||||||||||||
If enabled, collision debug rays will collide with vehicle physics spheres rather than their model_ | |||||||||||||||
When and | |||||||||||||||
Sets the maximum test ray length for | |||||||||||||||
Causes a floating pink cube and label "phantom bsp" to appear whenever a test ray from the center of the screen intersects with phantom BSP. It can be helpful to pair this with | |||||||||||||||
Represents the current origin of the | |||||||||||||||
See | |||||||||||||||
See | |||||||||||||||
Setting this to | |||||||||||||||
Setting this to | |||||||||||||||
Represents the current direction of the | |||||||||||||||
See | |||||||||||||||
See | |||||||||||||||
When | |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
No visible effect. May be related to controller input during development. | |||||||||||||||
No visible effect. May be related to controller input during development. | |||||||||||||||
No visible effect. May be related to controller input during development. | |||||||||||||||
No visible effect. May be related to controller input during development. | |||||||||||||||
| |||||||||||||||
When set to | |||||||||||||||
For this to be visible, | |||||||||||||||
If | |||||||||||||||
| |||||||||||||||
Toggles the display of structure BSP node traversal for the camera location. At each level, the node and plane indices are shown as well as a | |||||||||||||||
Shows debug information about the camera in the top left corner, including:
| |||||||||||||||
Disables collision tests against objects. For example, projectiles will pass through scenery and bipeds through non-moving vehicles. Vehicle-to-vehicle collision still happens, as does moving vehicle against biped. Everything still collides with the BSP. | |||||||||||||||
Globally disables vector/ray collision tests, with the following observed effects:
| |||||||||||||||
When enabled, looking at any collideable object and pressing Space will display the object's body and shield vitalities on the HUD. | |||||||||||||||
Logs damage to the player as messages at the bottom of the screen. Includes body and shield vitality and the damage source. | |||||||||||||||
Displays red numbers over each dynamic and permanent decal in the environment. The mesh of the most recently created decal (initially a permanent decal if one exists, then any new dynamic one) will also be highlighted so you can see how it conforms around the BSP. White points indicate the original 4 corners of the decal, while red ones were added during the conformation to the BSP. The meaning of the number is not known definitely, but seems to be the number of vertices needed if we assume each projected decal region must be converted into quads. | |||||||||||||||
When enabled, active detail object cells will be outlined in blue and individual detail objects are highlighted with red markers. | |||||||||||||||
| |||||||||||||||
Outlines the edges of fog plane volumes with white lines. | |||||||||||||||
No visible effect. Replaced with the Ctrl + F12 hotkey? | |||||||||||||||
Draws a series of red lines between corners and midpoints of the screen within the view frustrum. These can be seen to intersect with level geometry. | |||||||||||||||
| |||||||||||||||
| |||||||||||||||
Displays a series of ticks at the top of the screen which do not seem to be affected by player input. May be a broken feature? | |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
Shows orange and white spheres with the radius of each dynamic light. White seems to show when a light is not yet been activated, such as the Warthog's brake lights until their first use. Lens flare only lights are not shown since their radius is 0. | |||||||||||||||
Displays active sound_ | |||||||||||||||
Displays cyan spheres wherever material_ | |||||||||||||||
| |||||||||||||||
If enabled, completely stops the game from rendering new frames. This includes preventing the rendering of the developer console itself, so disabling this feature can be tricky. If you think the console is still open, press Up to re-enter the previous command, then replace its final argument with | |||||||||||||||
Disables portal-based occlusion culling for objects and parts of the BSP (use | |||||||||||||||
When enabled, toggles if debug information is visible on objects (such as bounding sphere and collision models). Individual debug features can be toggled with the | |||||||||||||||
When | |||||||||||||||
| |||||||||||||||
When | |||||||||||||||
When | |||||||||||||||
When | |||||||||||||||
| |||||||||||||||
| |||||||||||||||
Toggles the display of object names, for named objects. The names are shown in purple. | |||||||||||||||
When | |||||||||||||||
When | |||||||||||||||
When | |||||||||||||||
| |||||||||||||||
When | |||||||||||||||
| |||||||||||||||
When | |||||||||||||||
When | |||||||||||||||
| |||||||||||||||
No visible effect, even with | |||||||||||||||
| |||||||||||||||
When | |||||||||||||||
Shows the incoming light colour and vector for all objects which results from sampling lightmap data at the ground point beneath the object. This data is used to shade the object and cast its shadow. | |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
Toggles the display of yellow bounding spheres around each permanent decal in the environment. | |||||||||||||||
| |||||||||||||||
| |||||||||||||||
Sets the player's armour color in non-team games. The setting will take effect when the player respawns. The default value | |||||||||||||||
Displays a green physics pill where a co-op player would spawn if safe. | |||||||||||||||
Renders green or red markers wherever point_ Red markers indicate point_ | |||||||||||||||
Draws structure BSP portals as red outlines. | |||||||||||||||
Alias of | |||||||||||||||
| |||||||||||||||
| |||||||||||||||
Freezes the rendering viewport at the current camera location. The camera may still move after frozen, but all portal-based culling, skybox origin, FP models, and some debug overlays will still be based on the previously frozen camera location. This command is useful for inspecting portal behaviour where the camera cannot directly see. | |||||||||||||||
Unknown purpose. Does not affect the player's multiplayer score. | |||||||||||||||
Displays a table of active script threads, with their name, sleep time, and currently executing function. | |||||||||||||||
Sound sources will be labeled in 3D with their tag path and a their minimum and maximum distances shown as red and yellow spheres, respectively. | |||||||||||||||
If enabled, sound cache statistics will be shown in the top left corner of the screen, including how full it is. | |||||||||||||||
Shows a graph of sound cache slots at the top of the screen, similar to | |||||||||||||||
Displays the utilization of sound channel limits in the top left corner of the screen. | |||||||||||||||
Displays two columns of number pairs while sounds play with an unknown meaning. | |||||||||||||||
If enabled, shows the tag path of the cluster's current sound_ | |||||||||||||||
Unknown purpose. | |||||||||||||||
Renders 2D sprite effects like particles as simple white triangle outlines instead of with textures. This also displays some sprite statistics at the top of the screen. | |||||||||||||||
When enabled, all scenario_ | |||||||||||||||
Like | |||||||||||||||
If enabled, causes red messages to appear in the HUD which are related to texture and/or sound cache events. Exact meaning unknown. | |||||||||||||||
Renders all scenario trigger volumes and their names. | |||||||||||||||
Logs lines to the console output as unit animations occur. For example: | |||||||||||||||
Shows red console log output whenever a unit animation is missing. For example: | |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
Force-disconnects from the current multiplayer session and returns to the menu. This can be handy for quickly leaving a server after a game has ended without having to wait for the "Quit" option in the post-game lobby. | |||||||||||||||
Displays the current framerate in green in the bottom-right corner of the screen. | |||||||||||||||
| |||||||||||||||
Toggles if shooting bodies produces additional blood effects. | |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
Limits rendering to 30 FPS. | |||||||||||||||
| |||||||||||||||
Pauses the game world simulation. Backported from later titles for H1A. | |||||||||||||||
Sets the speed of the game simulation, with 1.0 being the default rate. Rates above 20 should be avoided. This global is new to H1A and should be used in place of the | |||||||||||||||
| |||||||||||||||
Unknown purpose. | |||||||||||||||
If enabled, causes the game to perform server latency analysis. Periodically, 20 samples will be taken and statistics will appear on the screen. | |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
Controls the amount of mouse input acceleration. Set to | |||||||||||||||
| |||||||||||||||
Sets the gain of the hit sound heard when damage is dealt in multiplayer. Defaults to | |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
Sets the amount of ambient light all objects receive. Note that this only affects moving objects when their lighting updates, so you will not see any change on scenery. Setting this to | |||||||||||||||
Scales ambient light from the lightmap. Defaults to | |||||||||||||||
Toggles if object lighting transitions smoothly when the object moves between different ground point surfaces or default lighting. | |||||||||||||||
Scales secondary light on objects, but doesn't apply to default lighting. Defaults to | |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
Enables or disables the magnetism aim assist for controllers. | |||||||||||||||
| |||||||||||||||
Displays profiling and budget information in the upper-left of the screen, including object, effects, particles, AI encounters, collision tests, and more. You may find it useful to open the console while using this feature in order to stop the game simulation. | |||||||||||||||
| |||||||||||||||
| |||||||||||||||
Broken feature -- causes a crash. | |||||||||||||||
| |||||||||||||||
| |||||||||||||||
Toggles the active camouflage distortion effect. When disabled, objects with active camouflage are rendered as they normally would without the effect. | |||||||||||||||
Toggles whether or not transparent shaders are shown through active camouflage. If disabled, shaders like glass or lights will not be visible through a camouflaged unit. | |||||||||||||||
Toggles bump mapping on the BSP, affecting both environmental bump lighting and specular reflections. If you only want to toggle bump lighting, use | |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
Forces certain object LODs to be used. A value of | |||||||||||||||
| |||||||||||||||
Disabling this silences "generic shader has no maps or stages" warnings in the console. Newly added to the MCC tools in the July 2023 CU. | |||||||||||||||
| |||||||||||||||
Toggles the rendering of detail objects. | |||||||||||||||
Defaults to | |||||||||||||||
Controls whether the first person weapon/arms is rendered before or after the rest of the scene. Defaults to Typically, the FP view draws first and also writes to a stencil buffer which is later used to prevent the background from overlapping the FP view. You can disable | |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
Toggles alpha testing for BSP shader_ | |||||||||||||||
Toggles the display and creation of both permanent and dynamic decals. While | |||||||||||||||
Toggles the rendering of dynamic light illumination on the BSP. | |||||||||||||||
Disables diffuse textures in the BSP, showing just the lightmap shading and specular components. | |||||||||||||||
Toggles both environmental sky fog and fog plane colors. Does not affect fog screen. Use | |||||||||||||||
Toggles the cloudy fog screen effect of fog planes, seen in the levels a30, c10, and c40. | |||||||||||||||
Toggles the rendering of structure BSP lightmaps. When disabled, the level will be completely invisible. | |||||||||||||||
Toggles specular reflections in the BSP. | |||||||||||||||
| |||||||||||||||
Toggles the rendering of dynamic mirrors. | |||||||||||||||
Toggles dynamic shadow mapping for objects. Same effect as | |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
Sets the far clip distance, which is the maximum draw distance (world units). Defaults to | |||||||||||||||
| |||||||||||||||
Sets the far clip distance, for the first person arms and weapon. Defaults to | |||||||||||||||
Sets the near clip distance of the first person arms and weapon. Defaults to | |||||||||||||||
| |||||||||||||||
Toggles atmospheric fog as defined in the active sky tag. | |||||||||||||||
Toggles the rendering of fog planes. | |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
Toggles the yellow and red dots seen in the motion sensor. | |||||||||||||||
Toggles rendering of all lens flares. | |||||||||||||||
Toggles lens flare occlusion. If set to | |||||||||||||||
Displays red squares over lens flares in the environment. How much the square is occluded by other geometry or the view frustrum is how much the lens flare fades out. The size of the square relates to the occlusion radius. | |||||||||||||||
Enables or disables texture filtering for lightmaps. When disabled, lightmaps will appear blocky and jagged. Has no effect in H1A. | |||||||||||||||
Toggles directional environmental bump mapped lighting. Does not affect the sampling of stored incident radiosity for object shadows. | |||||||||||||||
Sets the amount of ambient light when rendering the BSP in fullbright mode (like when radiosity has not yet been baked or | |||||||||||||||
Changes the rendering mode of lightmaps:
Any higher value will appear the same as | |||||||||||||||
Changes rendering mode of the level and its objects:
| |||||||||||||||
Toggles the rendering of all models. When disabled, all objects like scenery, units, projectiles, and even the skybox and FP arms will become invisible. The BSP and effects like particles and decals are still visible. | |||||||||||||||
| |||||||||||||||
Toggles the rendering of transparent shaders in models. For example, the Warthog's windshield. | |||||||||||||||
Sets the near clip distance, which is the minimum draw distance (world units). Defaults to | |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
Toggles the lens flare "god rays" effect, present on sky lights or lens flares explicitly set to sun. | |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
Toggles the display of screen flashes, such as those from a damage_ | |||||||||||||||
| |||||||||||||||
Toggles the blurring of dynamic object shadows. Defaults to | |||||||||||||||
When enabled, all dynamic object shadow maps will be rendered with a partially-shadowed background, making their rectangular boundaries visible. The size of this rectangle depends on the object's bounding radius. | |||||||||||||||
No visible effect. | |||||||||||||||
No visible effect. | |||||||||||||||
| |||||||||||||||
Displays renderer statistics on the screen, with several modes. All modes include at least framerate stats.
| |||||||||||||||
Enables or disables the stencil mask used to prevent the background scene from overlapping the first person view. Defaults to | |||||||||||||||
| |||||||||||||||
Toggles the rendering of shader_ | |||||||||||||||
No visible effect. Defaults to | |||||||||||||||
Toggles rendering in wireframe mode, which only draws pixels along triangle edges rather than filling trangles. This can be useful for troubleshooting portals. | |||||||||||||||
| |||||||||||||||
Controls how far away from surfaces new decals are generated, e.g. for projectile impacts. Defaults to | |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
Toggles the display of all contrails. | |||||||||||||||
If | |||||||||||||||
If enabled, all model markers will be rendered in 3D with their name and rotation axis. | |||||||||||||||
If enabled, all model skeletons will be rendered. Nodes are shown as axis gizmos and connected to their parents by white lines. | |||||||||||||||
| |||||||||||||||
If | |||||||||||||||
Toggles the display of all particles. | |||||||||||||||
Toggles the rendering of particle_ | |||||||||||||||
Toggles the display of dynamic object shadows. Same effect as | |||||||||||||||
No visible effect on weather or particle systems. | |||||||||||||||
Toggles if bipeds are ejected from overturned vehicles, including players and AI characters. Defaults to | |||||||||||||||
If enabled, causes level scripts to be run in Sapien. This would allow you to see how the beach battle plays out in b30, for example. | |||||||||||||||
When the | |||||||||||||||
Appears to set some kind of crop or scaling factor for generated screenshots, but is probably not working as intended. Setting this to a value other than | |||||||||||||||
| |||||||||||||||
Writes the sound cache information from | |||||||||||||||
| |||||||||||||||
Controls how quiet non-dialog sounds are when scripted dialog is playing (sound class must be | |||||||||||||||
Controls how "muffled" sounds are when heard behind an obstruction like the BSP or an object with collision geometry. Defaults to | |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
Renders a debug HUD with basic weapon information in text and line-drawn circular reticules representing the current error angle (yellow) and autoaim angle (blue, or red if autoaim active). Works in debug builds only. | |||||||||||||||
Toggles the display of console output. Defaults to | |||||||||||||||
Clears all loaded textures from the texture cache. Works in debug builds only. | |||||||||||||||
Toggles a live representation of the texture cache in the top left corner of the screen, depicting which entries are being loaded and evicted. Works in debug builds only. | |||||||||||||||
Shows a live list of all bitmap tag paths currently loaded in the texture cache. Works in debug builds only. | |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
Toggles the rendering of all weather_ |
Removed
Some defunct parts of HaloScript were removed in H1A MCC. This is not a complete list.
Function/global | Type | |
---|---|---|
No visible effect. Defaults to | Global |
Acknowledgements
Thanks to the following individuals for their research or contributions to this topic:
- Ifafudafi (Script limits information)
- InfernoPlus (Flipped vehicle test)
- kornman00 (Writing the original Blam Scripting Language Bible, explaining garbage collection)
- Krevil (Modulus operator)
- MattDratt (AI following the player tutorial)
- Mimickal (Additional background on scripting, edits for clarity and extra information)
- t3h lag (Additional script information (limits, types, functionality, etc...))