Debug Mode and Useful Commands

The ARMA3 Debug Console is designed to be a script testing and fault finding tool. It can be utilised in a variety of ways to aid in mission editing also. 

Please view and read the Official Bistudio Debug Console WIKI on the debug console for how the fields work and what the buttons and functions do. 

 

ENABLING THE DEBUG CONSOLE

Debug mode can be made available by enabling the debug mode option in the description.ext.

enableDebugConsole = 1;

This enables the debug console for admins,  this is the settings applied in the ASOR templates by default. Note: when you are hosting your mission in the editor you always have admin and therefore the debug console should always be available. On the server you need to login to admin for it to be accessible.  

 

DEBUG CONSOLE OPERATION

To access the debug console simply press ESC and your in it. 

A3_console_editor

 

Execute Box – This is used to execute any ARMA3 scripting. This can be used to do just about anything you can think of in the mission while your in it. If it can be scripted it can be executed here. 

Watch Box’s – There are four watch box’s. Alternating down the lighter box is where you put your code the box below it displays the result. These are used to test variables or get information while in your mission. The most popular one you might use is ‘getPosATL player’ which would give you an array for your physical location in the world something like [3456.2134,243.768,3.42354].

SERVER EXEC – GLOBAL EXEC – LOCAL EXEC Buttons

  • SERVER EXEC – executes the contents of the Execute field on the server only.
  • GLOBAL EXEC – executes the contents of the Execute field on the server and all connected clients. 
  • LOCAL EXEC – executes the contents of the Execute field on the local client only.

Local exec will only be available when in preview mode when editing as you are both the local client and the server there. When on the server it is very dependent on what you are doing as to what button to use. Locality of the code you are executing needs to be understood. An easy example of this is weather, local exec a weather change on the server will change your weather and no one elses. Server exec a weather change and the server will change no one else (not noticeable in game) Global exec and everyone should be on the same weather except possibly those that join later. 

I will not cover the buttons at the bottom as they are not really required for mission editing, see the Official Bistudio Debug Console WIKI

 

COMMON DEBUG CONSOLE COMMANDS

Common commands that can be used either in the Watch fields or Execute field.

  • player – returns the player (you)
  • cursorTarget – returns the object your cursor is pointing at
  • getPosATL – gets a position of something in the world
  • setPosATL – sets the position of something in the world

Combining these simple commands can allow you to do simple tasks without exiting and previewing multiple times. 

  • getPosATL player – returns position of players
  • getPosATL cursorTarget – returns the position of the object you are looking at (if there is one)

Using these options in the Execute field:

  • setPosATL player (getPosATL cursorTarget); – moves the player to the position of the object the player is looking at.

Use Execute Field as Notepad

Contents of the Execute Field and Watch fields should remain even after exiting the game and coming back in. You can use this to ‘save’ multiple pieces of information. For example if you need to get several positions to manually place items you can move the player to the positions in the editor and do getPosATL for each and copy each result from the watch field into the Execute field then before exiting copy them all out and use the where you need them. 

WIP

 

Category: Tags:
 

suits

ASOR Founder, Team Leader and Community Admin

Get in touch

ASOR

Talk to us on

MOBILE MENU