Skip to main content

The "sys_cmd_add" Function


sys_cmd_add(command, script);
commandstringThe command to listen for as a string, minus arguments
scriptscriptThe script to execute when the command is input


Adds a command to the command console which will execute the specified script when input. Note that the command here should only be written as the command itself; any additional arguments will be passed into the script automatically.

This script is run automatically by other engine functions to add included VNgen commands to the console database when it is opened. It is only necessary to run this script manually when adding custom commands to the console. As the command console is a global entity, custom commands can be added from anywhere in the project.