Arma 3 Scripting

Command in Object Manipulation

enableFreeLook

Also available as Markdown and JSON, or read the original wiki page.

Description

Enables or disables the freelook toggle (2x Alt)

Syntax

enableFreeLook enable

Parameters:

Returns: Boolean - Previous state

Examples

Example 1

enableFreeLook true;

Example 2

// a function to get the current state without making changes
private _fnc_isFreeLookToggled = 
{
  private _oldState = enableFreeLook true; // enable temporarily; get state
  enableFreeLook _oldState;
  _oldState; // return the state
};

private _isFreeLookToggled = call _fnc_isFreeLookToggled;

// a function to toggle the state
private _fnc_toggleFreeLook = 
{
  enableFreeLook !enableFreeLook false;
};

call _fnc_toggleFreeLook; // toggle it (if enabled->disable it, and vice versa)

See also

freeLook