BIS fnc allTurrets: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Some wiki formatting)
m (Text replacement - "sqf>_([a-zA-Z0-9_]+) = " to "sqf>private _$1 = ")
Line 22: Line 22:
|r2= [[Array]]
|r2= [[Array]]


|x1= <sqf>_allTurrets = "C_Offroad_01_F" call BIS_fnc_allTurrets; // []</sqf>
|x1= <sqf>private _allTurrets = "C_Offroad_01_F" call BIS_fnc_allTurrets; // []</sqf>


|x2= <sqf>_allTurrets = ["C_Offroad_01_F", true] call BIS_fnc_allTurrets; // [[0],[1],[2],[3]]</sqf>
|x2= <sqf>private _allTurrets = ["C_Offroad_01_F", true] call BIS_fnc_allTurrets; // [[0],[1],[2],[3]]</sqf>


|x3= <sqf>_allTurrets = ["C_Offroad_01_F", false] call BIS_fnc_allTurrets; // []</sqf>
|x3= <sqf>private _allTurrets = ["C_Offroad_01_F", false] call BIS_fnc_allTurrets; // []</sqf>


|seealso= [[allTurrets]] [[BIS_fnc_getTurrets]], [[BIS_fnc_turretConfig]], [[BIS_fnc_vehicleCrewTurrets]]
|seealso= [[allTurrets]] [[BIS_fnc_getTurrets]], [[BIS_fnc_turretConfig]], [[BIS_fnc_vehicleCrewTurrets]]
}}
}}

Revision as of 13:08, 6 May 2022

Hover & click on the images for description

Description

Description:
Returns all vehicle turrets from config with options. Does what allTurrets command does, except the param is vehicle's config classname.
Execution:
call
Groups:
Object Manipulation

Syntax

Syntax:
vehicleClass call BIS_fnc_allTurrets
Parameters:
vehicleClass: String - classname of the vehicle
Return Value:
Array of turret paths

Alternative Syntax

Syntax:
[vehicleClass, personTurrets] call BIS_fnc_allTurrets
Parameters:
vehicleClass: String - classname of the vehicle
personTurrets: Boolean - true to include FFV (firing from vehicle) turrets, false to exclude them
Return Value:
Array

Examples

Example 1:
private _allTurrets = "C_Offroad_01_F" call BIS_fnc_allTurrets; // []
Example 2:
private _allTurrets = ["C_Offroad_01_F", true] call BIS_fnc_allTurrets; // [[0],[1],[2],[3]]
Example 3:
private _allTurrets = ["C_Offroad_01_F", false] call BIS_fnc_allTurrets; // []

Additional Information

See also:
allTurrets BIS_fnc_getTurretsBIS_fnc_turretConfigBIS_fnc_vehicleCrewTurrets

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note