Page tree

Versions Compared

Key

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




Introduced in

Version:1.50

Description

Description:Sets
a
turret
's
alignment, and (optionally) fires the specified number of rounds.

Vehicle
turret will
turrets return to default alignment after firing.

Any defined fire arcs set using setFireArc are only considered for AI gunners.

Syntax

Syntax:[vehicle, turret, [azimuth, elevation], notstabilized, rounds] call fn_vbs_setGunPosition
Parameters:
turret
  • Turret path.
  • azimuth: Number -
direction
  • Direction relative to hull.
  • elevation: Number -
elevation
  • Elevation above the horizontal.
  • notstabilized: Boolean -
turn
  • Turn off turret stabilization (optional, default: true).
  • rounds: Number -
number
  • Number of rounds to fire (optional, default:
default
  • 0).
Return Value:Boolean - Returns true, if firing
was
is successful, or, if the function is called with only the vehicle as a parameter, if the vehicle is currently engaged in a firing sequence.

Warning

When using functions in VBS versions older than 3.4, certain limitations and requirements should be kept in mind - the main ones being that capitalization of the function name is crucial, and that #include "\vbs2\headers\function_library.hpp" has to be included in every script that utilizes it. More Category VBS Scripting Functions.

Examples

Examples:
_fired = [tank1,[0],[270,5],false,2] call fn_vbs_setGunPosition

Additional Information

See also: setWeaponDirection
Multiplayer: 
Problems: 

Notes