setWeaponDirection (VBS2)

From Bohemia Interactive Community

Jump to: navigation, search
Editors, please check Policy: Scripting Command Page Syntax.
Introduced in Virtual Battlespace 2 version 1.19

Click on the images for descriptions

Introduced in

Game:
Virtual Battlespace 2
Version:
1.19

Description

Description:
Sets the direction of the turret.

Requires that the gunner's input is disabled (via disableGunnerInput) before the command will have any effect.

The given direction vector is in world coordinates, so it is independent of the vehicle orientation. Only works with manned vehicles. In the case of units (not regular vehicles) the direction is relative to the unit's direction, and should be set accordingly.

Syntax

Syntax:
vehicle setWeaponDirection [turretPath,[azimuth, elevation],transition]
Parameters:
vehicle: Object - vehicle
turretPath: Array -
azimuth: Number - in degrees
elevation: Number - in degrees
transition: Boolean - (optional) default: true
Return Value:
Nothing

Alternative Syntax

Syntax:
unit setWeaponDirection [[azimuth, elevation],transition] (TWS version only!)
Parameters:
unit: Object - unit
azimuth: Number - in degrees
elevation: Number - in degrees
transition: Boolean - (optional) default: true
Return Value:
Nothing

Examples

Example 1:
_tank1 SetWeaponDirection [[0],[90,5]]

Additional Information

Multiplayer:
Behaviour unknown.
See also:
turretWeaponDirection, fn_vbs_getTurret

Notes

Notes

+ Add Note

Only post proven facts here. Use the talk page or the forums for discussions.

Notes

Posted on May 9, 2008 - 02:42
Kronzky
To find out which turrets are available on a vehicle, and what the syntax is, you can use this script.

Bottom Section

Personal tools
Buy ArmA now!