Print Control

Print Control

Improve the Lua print() console experience.

Designed to be quick and convenient to use, Print Control adds two essential abilities. The ability to show the script’s name when printing to the console and the ability to silence all or individual scripts, preventing them from writing to the console.

Showing the script name is split into two parts. Headers and Messages.

  • Headers make it easier to follow the code as it enters each function.

  • Customized messages identify which script wrote to the console when print() statements of multiple scripts are interweaved.

Silence frees up time spent on commenting/uncommenting print statements and helps to ensure that error messages don’t go unnoticed.

How to use


  1. Install the Print Control package.
  2. Place the PrintControl locator template in the world.
  3. Add the PrintControl_HelperScript template to the locator.
  4. Copy and paste the function.
PrintControl Locator

Place the PrintControl locator template into the world. Do this step only once.

Helper Scripts
  1. Add the PrintControl_HelperScript template to the PrintControl locator.

  2. Change the Target Script property to the desired script. This step is only done once per script file, even if there are multiple script instances.

  3. Rename the script folder from its default name of printControl_HelperScript to the name of the target script. This step is optional but highly recommended.

  4. The final step is to add a function to the target script. This function is automatically generated and displayed in the console when the user previews the game. Copy and paste this function into the target script.

Repeat these steps for each script to be controlled.

Other Details
  • After changing settings, there is a short delay before they take effect. Cycle the preview once more if desired.

  • The helper script will look for the Target Script for five seconds. The function named ‘ActivatePrintControl’ on the helper script can be called manually when the target script belongs to an entity spawned five or more seconds after runtime.

  • Read the property tooltips for additional information.


1 Like