Jump to content

Category:Script Events

From OpenBOR
Revision as of 11:02, 12 July 2026 by Dcurrent (talk | contribs) (Created page with "The following is an index of script event hooks. Script events are points during engine activity where OpenBOR executes either a native script or a user-defined script. Provided the script file exists and has been loaded, OpenBOR calls the main() function within that file. Depending on its purpose, the script may modify properties, alter how the event is processed, or cancel the parent event entirely. For example, OpenBOR checks for data/scripts/update.c when the gam...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

The following is an index of script event hooks.

Script events are points during engine activity where OpenBOR executes either a native script or a user-defined script. Provided the script file exists and has been loaded, OpenBOR calls the main() function within that file.

Depending on its purpose, the script may modify properties, alter how the event is processed, or cancel the parent event entirely.

For example, OpenBOR checks for data/scripts/update.c when the game starts. When the file exists, OpenBOR loads it and executes its main() function during every internal engine update.