Skip to content

LockOn_Options#

The LockOn_Options table provides several useful parameters and values.


avionics_language#

String representation of avionics language

Usage

local lang = LockOn_Options.avionics_language


cockpit#

Table containing cockpit-related options.

Usage

local cockpitOptions = LockOn_Options.cockpit


cockpit_language#

String representation of the cockpit language.

Usage

local cockpitLang = LockOn_Options.cockpit_language


common_ground_script_path#

String path to the CA (Combined Arms) cockpit scripts.

Usage

local caPath = LockOn_Options.common_ground_script_path


common_script_path#

String path to the common cockpit scripts.

Usage

local commonPath = LockOn_Options.common_script_path


date#

Table containing the current date (day, month, year).

Usage

local date = LockOn_Options.date
-- date.day, date.month, date.year


flight#

Table containing flight-related options.

Usage

local flightOptions = LockOn_Options.flight.unlimited_fuel
Values

Option Type Description
unlimited_fuel bool Unlimited fuel
g_effects bool G-effects enabled
radio_assist bool Radio assist enabled
unlimited_weapons bool Unlimited weapons
external_view bool External view enabled
easy_radar bool Easy radar mode
easy_flight bool Easy flight mode
external_labels bool External labels enabled
crash_recovery bool Crash recovery enabled
immortal bool Invincibility enabled
tool_tips_enabled bool Tool tips enabled
padlock bool Padlock view enabled
aircraft_switching bool Aircraft switching enabled

init_conditions#

Get the state of the spawn. Useful for configuring your aircraft depending on the initial state.

The init_conditions table contains an entry "birth_place" which allows you to differentiate spawn types. The following are the spawn string literals:

  • In Air Hot: string | "AIR_HOT"
  • On Ground Hot: string | "GROUND_HOT"
  • Cold Start: Unknown (see usage)

Usage

local birth = LockOn_Options.init_conditions.birth_place

if birth == "GROUND_HOT" or birth == "AIR_HOT" then
    -- hot start init
else
    -- cold start init
end


measurement_system#

String indicating the measurement system in use.

Usage

local system = LockOn_Options.measurement_system


mission#

Table containing mission-related options.

This does't seem to return anything useful, see do_mission_file("mission") to get the mission file.

Usage

local mission = LockOn_Options.mission


screen#

Table containing screen parameters (aspect, height, width).

Usage

local screen = LockOn_Options.screen
-- screen.aspect, screen.height, screen.width


script_path#

String path to the cockpit scripts.

Usage

local scriptPath = LockOn_Options.script_path


time#

Table containing the current time (hours, minutes, seconds).

Usage

local time = LockOn_Options.time
-- time.hours, time.minutes, time.seconds