unitTurret: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(Created page with "{{Command|Comments= ____________________________________________________________________________________________ | arma3dev |Game name= |1.99|Game version= _________________...")
 
mNo edit summary
 
(40 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{Command|Comments=
{{RV|type=command
____________________________________________________________________________________________


| arma3dev |Game name=
|game1= arma3
|version1= 2.00


|1.99|Game version=
|gr1= Turrets
____________________________________________________________________________________________


| Returns the turret path the given vehicle's gunner is in. [-1] if gunner is driver. |DESCRIPTION=
|descr= Returns the turret path the given vehicle's gunner is in.
____________________________________________________________________________________________
To get the turret's unit see [[turretUnit]].


| vehicle [[unitTurret]] gunner |SYNTAX=
|s1= vehicle [[unitTurret]] gunner


|p1= vehicle: [[Object]] |PARAMETER1=
|p1= vehicle: [[Object]]


|p2= gunner: [[Object]] |PARAMETER2=
|p2= gunner: [[Object]]


|p3= |PARAMETER3=
|r1= [[Array]] format [[Turret Path]]
- {{hl|[-1]}} is returned if the [[gunner]] is also the [[driver]].
When no units are in any of vehicle's turret, empty array {{hl|[]}} is returned.


| [[Array]] - turret path |RETURNVALUE=  
|x1= <sqf>_vehicle unitTurret _gunner;</sqf>


|x2= <sqf>vehicle player unitTurret player;</sqf>


|x1= <code>_vehicle [[unitTurret]] _gunner;</code>|EXAMPLE1=
|seealso= [[turretUnit]] [[driver]] [[gunner]] [[commander]] [[effectiveCommander]] [[currentPilot]] [[moveInTurret]] [[assignAsTurret]] [[assignedVehicleRole]] [[lockedTurret]] [[isTurnedOut]]
|x2= <code>[[vehicle]] [[player]] [[unitTurret]] [[player]];</code>|EXAMPLE2=
 
____________________________________________________________________________________________
 
| [[turretUnit]], [[driver]], [[gunner]], [[commander]], [[effectiveCommander]], [[currentPilot]], [[moveInTurret]], [[assignAsTurret]], [[assignedVehicleRole]], [[lockedTurret]], [[isTurnedOut]] |SEEALSO=
 
|  |MPBEHAVIOUR=
____________________________________________________________________________________________
}}
}}
<h3 style='display:none'>Notes</h3>
<dl class='command_description'>
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>
<h3 style='display:none'>Bottom Section</h3>
[[Category:Scripting Commands Arma 2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Take On Helicopters|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
[[Category:Command_Group:_Vehicle_Assignment|{{uc:{{PAGENAME}}}}]]
[[Category:Command_Group:_Object_Information|{{uc:{{PAGENAME}}}}]]

Latest revision as of 10:10, 28 September 2023

Hover & click on the images for description

Description

Description:
Returns the turret path the given vehicle's gunner is in. To get the turret's unit see turretUnit.
Groups:
Turrets

Syntax

Syntax:
vehicle unitTurret gunner
Parameters:
vehicle: Object
gunner: Object
Return Value:
Array format Turret Path - [-1] is returned if the gunner is also the driver. When no units are in any of vehicle's turret, empty array [] is returned.

Examples

Example 1:
_vehicle unitTurret _gunner;
Example 2:
vehicle player unitTurret player;

Additional Information

See also:
turretUnit driver gunner commander effectiveCommander currentPilot moveInTurret assignAsTurret assignedVehicleRole lockedTurret isTurnedOut

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