Pressing the “~” key opens the console. While primarily used by developers, the console is also valuable for scripters creating maps in the Scenario Editor. It’s useful for logging messages, such as confirming if a trigger was successfully activated.
The button to open the console in the editor is located here:
In Play Mode, the button to open the console is located here:
The console is often used to identify errors or issues caused by incorrect scripting. If something isn’t working as expected, check the console for details.
Next to the console icon, you’ll always see a number indicating how many errors have occurred. An Error means something didn’t go as expected, but it won’t crash the game. You can still continue working on your scenario. Here’s an example of what an error looks like:
A NullException indicates a critical error that “crashes” game. While you can still work on your scenario, there’s a 100% chance that certain elements won’t function properly. Here’s an example of how an exception error looks:
To resolve this, restart the scenario by going back to the main menu and then reopening the scenario. This should fix the problem. An exception error will always have “Exception” in its name.
Here’s an example of how the console looks with both an error and an exception: