addWeaponItem: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "{{Command " to "{{RV|type=command ") |
Lou Montana (talk | contribs) m (Text replacement - " *\| *PARAMETER[0-9]{1,3} *= * " to " ") |
||
Line 26: | Line 26: | ||
| s2= unit '''addWeaponItem''' [weaponName, [itemName, ammoCount, muzzleName], instant] | | s2= unit '''addWeaponItem''' [weaponName, [itemName, ammoCount, muzzleName], instant] | ||
|p21= unit: [[Object]] | |p21= unit: [[Object]] | ||
|p22= [weaponName, [magazineName, ammoCount, muzzleName], instant]: [[Array]] | |p22= [weaponName, [magazineName, ammoCount, muzzleName], instant]: [[Array]] | ||
|p23= weaponName: [[String]] - name of the weapon to add magazine to | |p23= weaponName: [[String]] - name of the weapon to add magazine to | ||
|p24= [itemName, ammoCount, muzzleName]: [[Array]] | |p24= [itemName, ammoCount, muzzleName]: [[Array]] | ||
|p25 = itemName: [[String]] - class name of the item to add (if magazine, muzzle will be autodetected unless specified) | |p25 = itemName: [[String]] - class name of the item to add (if magazine, muzzle will be autodetected unless specified) | ||
|p26 = ammoCount (Optional): [[Number]] - optional amount of ammo in magazine | |p26 = ammoCount (Optional): [[Number]] - optional amount of ammo in magazine | ||
|p27 = muzzleName (Optional): [[String]] - optional target muzzle to add magazine to | |p27 = muzzleName (Optional): [[String]] - optional target muzzle to add magazine to | ||
|p28 = instant (Optional): [[Boolean]] - [[true]] to skip animation. Default: [[false]] | |p28 = instant (Optional): [[Boolean]] - [[true]] to skip animation. Default: [[false]] | ||
|r2= [[Nothing]] | |r2= [[Nothing]] |
Revision as of 18:09, 29 January 2021
Description
- Description:
- Description needed
- Groups:
- Unit Inventory
Syntax
- Syntax:
- Syntax needed
- Parameters:
- unit: Object
- [weaponName, itemName, instant]: Array
- weaponName: String - name of the weapon to add magazine to
- itemName: String - class name of the item to add (if magazine, muzzle will be autodetected)
- instant (Optional): Boolean - true to skip animation. Default: false
- Return Value:
- Return value needed
Alternative Syntax
- Syntax:
- unit addWeaponItem [weaponName, [itemName, ammoCount, muzzleName], instant]
- Parameters:
- unit: Object
- [weaponName, [magazineName, ammoCount, muzzleName], instant]: Array
- weaponName: String - name of the weapon to add magazine to
- [itemName, ammoCount, muzzleName]: Array
- itemName: String - class name of the item to add (if magazine, muzzle will be autodetected unless specified)
- ammoCount (Optional): Number - optional amount of ammo in magazine
- muzzleName (Optional): String - optional target muzzle to add magazine to
- instant (Optional): Boolean - true to skip animation. Default: false
- Return Value:
- Nothing
Examples
- Example 1:
player addWeaponItem ["arifle_MX_GL_ACO_F", "1Rnd_HE_Grenade_shell"];
- Example 2:
player addWeaponItem ["arifle_MX_GL_ACO_F", ["1Rnd_HE_Grenade_shell", 1, "GL_3GL_F"]];
- Example 3:
player addWeaponItem ["Laserdesignator", "Laserbatteries"];
Additional Information
- See also:
- See also needed
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