Lua Console

The Lua Console provides an in-game interface where you can run Lua commands.

Properties

Property Function
First Key Combined with Second Key, specifies the key combination that opens the console.

Second Key | Visible | If ticked, the console is visible. Min Size | The minimum size of the Lua console window. Max History | The number of previous Lua commands to remember. Pause Game While Open | Sets Time.timeScale to zero while open.

Details

During gameplay, ~+L (tilde plus the L key) toggles the console (unless you've changed the key bindings), which allows you to enter Lua commands and see their results. You can use the up and down arrow keys to move through the history of your Lua commands.

The Lua Console is useful for debugging Lua commands and examining the internal state of the Lua environment. For example, if you have a dialogue entry that's supposed to set a variable to a certain value, you can use the console to confirm that the variable is set. The console displays the return values of your commands. It doesn't display the output of print statements. To examine the value of a variable, use syntax such as:

return Actor['Player'].Name

You can also use the console to manually set values if you want to test specific parts of your conversations.

Note: Put

return

at the front of your input to see its return value, as in the example above.


<< Component Reference