Page tree
Skip to end of metadata
Go to start of metadata

   

Introduced in

Version:18.2.0

Description

Description:Gets the current state of the turret control override.

Syntax

Syntax:

result = commanderOverride [vehicle, turretPath]

Parameters:
  • vehicle: Object - Vehicle where the turret is located.
  • turretPath: Array - Turret path (to the turret potentially being overridden).
Return Value:

Array - An array of length 0, 2, or 4, with the following elements: [isOverridden /false/, isOverriddenOptics] or [isOverridden /true/, isOverriddenOptics, overridingTurret, overridingGunner]

  • isOverridden: Boolean - True, if the turret is being overridden by another one. Denotes the result array having 4 elements.
  • isOverriddenOptics: Boolean - True, if the optics are overridden as well.
  • overridingTurret: Array - Present only if the turret is overridden. This is the path to the turret that overrides the turret referenced in the command parameter.
  • overridingGunner: Object - Present only if the turret is overridden. Crew of the overriding turret.

Zero-length array is returned if an error occurs (for example, a vehicle / turret does not exist).

Examples

Examples:_retval = commanderOverride [tank1, [0]]

Additional Information

See also:setCommanderOverride
Multiplayer:-
Problems:-

Notes