|Description:||Returns the turret path of a given unit. Alternately, it can be used to find the path to a turret with a given class name.|
|Syntax:||[vehicle, unit] call fn_vbs_getTurret|
|Return Value:||Array - Path to turret used by unit. If the unit is not in a turret of that vehicle, then: |
In v1.30+: Returns an empty array
Before v1.30: The function has a bug, returns the last turret of the vehicle.
|Syntax:||[vehicle, turretName] call fn_vbs_getTurret (v1.30+)|
|Return Value:||Array - Path to turret. If the turret does not exist, then returns an empty array.|
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.
_path = [tank1, player] call fn_vbs_getTurret
_path = ["VBS2_GB_Mastiff_W_HMG", "Turret_1"] call fn_vbs_getTurret
|See also:||listAllTurrets, fn vbs getTurretCfg|