Skip to content

# Commands

Grisgram edited this page Aug 15, 2025 · 1 revision

Scriptor offers some preprocessor commands which start with a # character.

#broker

The command for Self-Registering Scripts. Please see the documentation there.

#include

Include another script into this one. Includes are recursive, so your included script may contain another include and so on.

You have to specify the full path name (in the SCRIPTOR_ROOT_FOLDER) of a script.

Here's an example: Imagine your included files structure is like this:

scripts/
    main/
    monsters/
        orcs/
            orc_died.scriptor

To include the orc_died into another script, you have to write

#include monsters/orcs/orc_died

#time

This simple command has no arguments and will tell scriptor to measure the running time of a script.

It's always good to know, how much time your scripts need, especially when there's lots of action going on.

The #time command will print a debug-log-line to the console when a script is finished, that looks like this:

945: D game/cards/dice/dice_card_play finished with result 'undefined' in 214µs

This is printed only, when

  • #time has been set in the script or DEBUG_LOG_SCRIPTOR is set to true in the Logger_Configuration
  • The game must be in CONFIGURATION_DEV to print the line (i.e. the "Default" configuration in GameMaker)
Clone this wiki locally