weapons: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - " <dd class="notedate">" to " <dt><dt> <dd class="notedate">") |
BrettMayson (talk | contribs) mNo edit summary |
||
(19 intermediate revisions by one other user not shown) | |||
Line 2: | Line 2: | ||
|game1= ofp | |game1= ofp | ||
|version1= 1.75 | |version1= 1.75 | ||
|game2= ofpe | |game2= ofpe | ||
|version2= 1.00 | |version2= 1.00 | ||
|game3= arma1 | |game3= arma1 | ||
|version3= 1.00 | |version3= 1.00 | ||
|game4= arma2 | |game4= arma2 | ||
|version4= 1.00 | |version4= 1.00 | ||
|game5= arma2oa | |game5= arma2oa | ||
|version5= 1.50 | |||
|version5= 1. | |||
|game6= tkoh | |game6= tkoh | ||
|version6= 1.00 | |version6= 1.00 | ||
|game7= arma3 | |game7= arma3 | ||
|version7= 0.50 | |version7= 0.50 | ||
Line 35: | Line 28: | ||
|descr= Returns array of names of all unit's weapons. | |descr= Returns array of names of all unit's weapons. | ||
| | |s1= [[weapons]] unit | ||
|p1= unit: [[Object]] | |p1= unit: [[Object]] | ||
|r1= | |r1= [[Array]] of [[String]]s - weapon class names | ||
|seealso= [[magazines]] | |x1= <sqf>_wArray = weapons player;</sqf> | ||
|seealso= [[magazines]] [[weaponsTurret]] [[assignedVehicleRole]] [[weaponState]] | |||
}} | }} | ||
<dl class="command_description"> | <dl class="command_description"> | ||
< | |||
<dt></dt> | |||
<dd class="notedate">Posted on 12:07, 20 January 2007</dd> | <dd class="notedate">Posted on 12:07, 20 January 2007</dd> | ||
<dt class="note> | <dt class="note">[[User:Bdfy|Bdfy]]</dt> | ||
<dd class="note"> | |||
{{GVI|arma1|1.02}} This command returns only weapons defined for the primary turret of the vehicle. | {{GVI|arma1|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"] | for ex. only ["D81", "PKT"] for t72, not ["D81", "PKT","DSHKM"] | ||
</dd> | |||
<dt><dt> | <dt><dt> | ||
<dd class="notedate">Posted on 06:01, 3 March 2007 (CET)</dd> | <dd class="notedate">Posted on 06:01, 3 March 2007 (CET)</dd> | ||
<dt class="note> | <dt class="note">[[User:Donnervogel|Donnervogel]]</dt> | ||
<dd class="note">''weapons'' never returns the weapon "Throw" which all soldier units have have to throw hand grenades. You'd have to use [[hasWeapon]] to verify it. Also hand grenades are not listed since they are magazines. Use [[magazines]] for that. | |||
</dd> | |||
<dt><dt> | <dt><dt> | ||
<dd class="notedate">Posted on 11 March 2011</dd> | <dd class="notedate">Posted on 11 March 2011</dd> | ||
<dt class="note> | <dt class="note">[[User:.kju|.kju]]</dt> | ||
<dd class="note"> | <dd class="note"> | ||
Use [[weaponsTurret]] to determine the weapons of a non gunner/turret position. | Use [[weaponsTurret]] to determine the weapons of a non gunner/turret position. | ||
<dt><dt> | <dt><dt> | ||
<dd class="notedate">Posted on 25 November 2011</dd> | <dd class="notedate">Posted on 25 November 2011</dd> | ||
<dt class="note> | <dt class="note">[[User:Dr_Eyeball|Dr_Eyeball]]</dt> | ||
<dd class="note"> | <dd class="note"> | ||
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.) | 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.) | ||
</dl> | </dl> |
Latest revision as of 22:03, 26 September 2024
Description
- Description:
- Returns array of names of all unit's weapons.
- Groups:
- Unit InventoryVehicle Inventory
Syntax
Examples
- Example 1:
Additional Information
- See also:
- magazines weaponsTurret assignedVehicleRole weaponState
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
- Posted on 12:07, 20 January 2007
- Bdfy
- 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 hand grenades. You'd have to use hasWeapon to verify it. Also hand grenades 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.)
Categories:
- Scripting Commands
- Introduced with Operation Flashpoint version 1.75
- Operation Flashpoint: New Scripting Commands
- Operation Flashpoint: Scripting Commands
- Operation Flashpoint: Elite: Scripting Commands
- ArmA: Armed Assault: Scripting Commands
- Arma 2: Scripting Commands
- Arma 2: Operation Arrowhead: Scripting Commands
- Take On Helicopters: Scripting Commands
- Arma 3: Scripting Commands
- Command Group: Unit Inventory
- Command Group: Vehicle Inventory