Expanding the API


NewEngine's API currently contains a combined 42 functions.

Expanding on this is as simple as creating a new script in the /newEngine/scripts/ directory with the same name as the new API function.

The naming rule is that the new script must be preceeded by ic-, such as ic-loadLevel.bat or ic-waitForEffects.bat

To add the unset function to the API, this is the required code:

The code behind the 'Unset' API.

This code first tokenizes the exec variable, which is previously set by the main script.

Once tokenized, the specified runtime variable is checked for invalid characters, this ensures code stability.

If the safety check fails, an error is logged and the script returns execution.

However, if the check is passed, the specified runtime variable is unset, no error is logged, and execution is again returned.