weaponsTurret: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Split examples)
(mass edit: removing obsolete </dt> and </dd> tags)
Line 34: Line 34:
<!-- Note Section BEGIN -->
<!-- Note Section BEGIN -->


<dd class="notedate">Posted on 11 March 2011</dd>
<dd class="notedate">Posted on 11 March 2011
<dt class="note>'''[[User:kju|kju]]'''</dt>
<dt class="note>'''[[User:kju|kju]]'''
<dd class="note">
<dd class="note">
Use [[assignedVehicleRole]] in combination to easily determine the weapons for any vehicle position. You need to check for -1 if the unit is in the driver/pilot position. See example 3 and 4.
Use [[assignedVehicleRole]] in combination to easily determine the weapons for any vehicle position. You need to check for -1 if the unit is in the driver/pilot position. See example 3 and 4.
</dd>
 


<!-- Note Section END -->
<!-- Note Section END -->

Revision as of 03:50, 18 October 2011

Hover & click on the images for description

Description

Description:
Returns all weapons of given turret. Use turret path [-1] for driver's turret.
Groups:
Uncategorised

Syntax

Syntax:
vehicle weaponsTurret turretPath
Parameters:
vehicle: Object
turretPath: Array
Return Value:
Array of Strings

Examples

Example 1:
_weapons = vehicle player weaponsTurret [0,0]
Example 2:
_weapons = _tank weaponsTurret [0]
Example 3:
_driverWeapon = _ka50pilot weaponsTurret [-1]
Example 4:
_weaponsForAnyTurrentPosition = (vehicle player) weaponsTurret ((assignedVehicleRole player) select 1)

Additional Information

See also:
addMagazineTurretmagazinesTurretremoveMagazinesTurretremoveMagazineTurretweaponsassignedVehicleRole

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

Notes

Posted on 11 March 2011
kju
Use assignedVehicleRole in combination to easily determine the weapons for any vehicle position. You need to check for -1 if the unit is in the driver/pilot position. See example 3 and 4.

Bottom Section