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


Introduced in

Version:1.19

Description

Description:Disables gunner input.

The described effects on units (alternative syntax) assumes that the weapon float zone (set in the Controls menu) has a value > 0. If it's set to 0, then the weapon will always move along with the body.

See MP notes below

Syntax

Syntax:vehicle disableGunnerInput [turret,disable,notstabilized]
Parameters:
  • vehicle: Object - Vehicle with turrets
  • turret: Array - Turret path
  • disable: Boolean - If true, AI will not control turret anymore.
  • notstabilized: Boolean - If true, turret stabilization is off. (V1.50)
Return Value:Nothing

Alternative Syntax

Syntax:unit disableGunnerInput mode (V1.50+)
Parameters:
  • unit: Object -
  • mode: Boolean or Number - Version 1.40: If true, player cannot move weapon independently from body, or move his head, or turn his body.
    Version 1.50+ (body movements are never disabled):
    • 0 or false: No restrictions. Player can move his weapon independently from the body, and can move his head via <Alt>-Mouse.
    • 1 or true: Player can not move the weapon independently from the body. Head can be moved.
    • 2: Player can move his weapon, but not the head.
    • 3: Player can move neither the weapon nor the head.
Return Value:Nothing

Examples

Examples:
_vehicle disableGunnerInput [[0],true]
_unit disableGunnerInput 3

Additional Information

See also: getGunnerInputStatus, setWeaponDirection, setHeadDir
Multiplayer:At start-up, the turret is local to the server. When a player or AI enters the turret, its locality changes to that of the gunner (the turret is always local to gunner). The vehicle locality remains un-changed.

When the gunner exits the turret, its locality does not change. The locality of a turret only changes when a gunner with a different locality enters it.

disableGunnerInput must be called locally to the turret, not the vehicle.
Problems:

Notes







UNN
setWeaponDirection will only work when stabilization is enabled, see alternative syntax. If stabilization is disabled using the alternative syntax, subsequent calls using the original syntax will prevent setWeaponDirection from working correctly.