enableFreeLook: Difference between revisions

From Bohemia Interactive Community
(Created page with "{{RV|type=command |game1= arma3 |version1= 2.22 |gr1= Object Manipulation |descr= Enables or disables the freelook toggle (2x Alt) |s1= enableFreeLook enable |p1= Boolean - enable or disable the toggle |r1= Boolean - Previous state |x1= <sqf>enableFreeLook true;</sqf> |seealso= freeLook }}")
 
mNo edit summary
 
(2 intermediate revisions by the same user not shown)
Line 13: Line 13:


|x1= <sqf>enableFreeLook true;</sqf>
|x1= <sqf>enableFreeLook true;</sqf>
|x2= <sqf>// 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)
</sqf>


|seealso= [[freeLook]]
|seealso= [[freeLook]]
}}
}}

Latest revision as of 20:00, 14 March 2026

Hover & click on the images for description

Description

Description:
Enables or disables the freelook toggle (2x Alt)
Groups:
Object Manipulation

Syntax

Syntax:
enableFreeLook enable
Parameters:
Boolean - enable or disable the toggle
Return Value:
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)

Additional Information

See also:
freeLook

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord.
Only post proven facts here! Add Note