weapons: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
m (see also & note clarify)
Line 17: Line 17:
____________________________________________________________________________________________
____________________________________________________________________________________________
   
   
|x1= <code>_wArray <nowiki>=</nowiki> weapons [[player]]</code> |= Example 1
|x1= <code>_wArray <nowiki>=</nowiki> [[weapons]] [[player]];</code> |= Example 1
____________________________________________________________________________________________
____________________________________________________________________________________________


| [[magazines]], [[weaponsTurret]], [[assignedVehicleRole]] - [[:Category:Weapons|Link to game weapons category]] |= See also
| [[magazines]], [[weaponsTurret]], [[assignedVehicleRole]], [[:Category:Weapons|Link to game weapons category]], [[weaponState]], [[ArmA:_Weapons]] |= See also


}}
}}
Line 32: Line 32:
<dd class="notedate">Posted on 06:01, 3 March 2007 (CET)
<dd class="notedate">Posted on 06:01, 3 March 2007 (CET)
<dt class="note>'''[[User:Donnervogel|Donnervogel]]'''<dd class="note">''weapons'' never returns the weapon "Throw" which all soldier units have have to throw handgrenades. You'd have to use [[hasWeapon]] to verfy it. Also handgrenades are not listed since they are magazines. Use [[magazines]] for that.
<dt class="note>'''[[User:Donnervogel|Donnervogel]]'''<dd class="note">''weapons'' never returns the weapon "Throw" which all soldier units have have to throw handgrenades. You'd have to use [[hasWeapon]] to verfy it. Also handgrenades are not listed since they are magazines. Use [[magazines]] for that.
<dd class="notedate">Posted on 12:58, 11 March 2007 (CET)
<dt class="note>'''[[User:Shuko|Shuko]]'''<dd class="note">Since searching for weapons takes you to this page, this link might be useful. [[ArmA:_Weapons]]


<dd class="notedate">Posted on 11 March 2011
<dd class="notedate">Posted on 11 March 2011

Revision as of 01:31, 3 September 2014

Hover & click on the images for description

Description

Description:
Returns array of names of all Unit's weapons.
Groups:
Uncategorised

Syntax

Syntax:
Array = weapons vehicleName
Parameters:
vehicleName: Object
Return Value:
Array of weapon names.

Examples

Example 1:
_wArray = weapons player;

Additional Information

See also:
magazinesweaponsTurretassignedVehicleRoleLink to game weapons categoryweaponStateArmA:_Weapons

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

In Armed Assault version 1.02 this command returns only weapons defined for the primary turret of the vehicle. for ex. only ["D81", "PKT"] for t72, not ["D81", "PKT","DSHKM"]
Posted on 06:01, 3 March 2007 (CET)
Donnervogel
weapons never returns the weapon "Throw" which all soldier units have have to throw handgrenades. You'd have to use hasWeapon to verfy it. Also handgrenades are not listed since they are magazines. Use magazines for that.
Posted on 11 March 2011
kju
Use weaponsTurret to determine the weapons of a non gunner/turret position.
Posted on 25 November 2011
Dr_Eyeball
This command does not include non-turret weapons, such as smoke, flare or chaff launchers which are usually declared in the root of the vehicle's class, rather than in the Turrets hierarchy. (Unsure whether it excludes it because it is not in the turret or because these are not considered true weapons via some property.)
Posted on 18 June 2013
Druid
Lists also weapons in inventory from Arma 3 ver. 0.70.

Bottom Section