Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.



Introduced in

Version:1.19

Description

Description:

Lets the vehicle commander override turret control.

The turret does not have to be crewed. It is also possible to specify whether the commander should use the overridden turret optics or not (V17.4.0+).

Note: The command is available in VBS2, but is only available in VBS3 from V17.4.0+.

Syntax

Syntax:commander setCommanderOverride [vehicle, weaponpath]
Parameters:
  • unit: Object - The commander.
  • vehicle: Object - The affected vehicle.
  • weaponpath: Number - The path to the turret.
Return Value:Nothing

Alternative Syntax

Syntax:commander setCommanderOverride [vehicle, turret, optics] (V17.4.0+)
Parameters:
  • commander: Object - The commander (must be a gunner of a turret). Provide objNull to cancel the override.
  • vehicle: Object - The affected vehicle.
  • turret: Array - The overridden turret.
  • optics: Boolean - If true, then the commander optics are replaced by gunner optics (optional, default: true).
Return Value:Nothing

Examples

Examples:
player setCommanderOverride [vehicle, _turretPath]
Override control of tank1 main gun by tank1 commander:
(commander tank1) setCommanderOverride [tank1,[0]]
Revoke override of tank1 main gun:
objNull setCommanderOverride [tank1,[0]]
Override control of player vehicle main gun by player and make him use overriden turret optics:
player setCommanderOverride [vehicle player,[0],true]
Override control of player vehicle main gun by player and make him use own turret optics:
player setCommanderOverride [vehicle player,[0],false]
Revoke override of player vehicle main gun:
objNull setCommanderOverride [vehicle player,[0]]

Additional Information

See also: setDriverOverride
Multiplayer:
 

Problems:
 

Notes