Page MenuHomeFeedback Tracker

Add/Alter script command to add perfectly configured weapons to cargo
New, WishlistPublic

Description

Syntax:

unit addWeaponItemsCargo [weapon, attachments, magazines];

Parameters:

unit => Object
weapon => String: weapon class name
attachments => Array: [attachment1, attachment2, attachment3]
magazines => Array: [magazine1, magazine2, ...]

    magazineX =>    Array: [magazineName, ammoCount, muzzle]

or combined:

unit addWeaponItemsCargo [weaponName, [attachment1, attachment2, attachment3], [[magazineName1, ammoCount1, muzzleName1], [magazineName2, ammoCount2, muzzleName2], ...]];

The third parameter is proposed as an array to handle weapons with UGLs/mutliple muzzles, which could have other loaded magazine.

Details

Legacy ID
1853150511
Severity
None
Resolution
Open
Reproducibility
N/A
Category
Scripting
Steps To Reproduce

Example:
_crate addWeaponItemsCargo ["arifle_MX_GL_ACO_F", ["muzzle_snds_H", "", ""], [["30Rnd_65x39_caseless_mag", 15, "arifle_MX_GL_ACO_F"], ["3Rnd_HE_Grenade_shell", 2, "GL_3GL_F"]]];

Adds a MX rifle with grenade launcher without optic or flashlight, but with a silencer. The weapon has a loaded magazine with 15 rounds left and and the grenade launcher has a GL grenade clip loaded with 2 grenades left. Note how "arifle_MX_GL_ACO_F" has an ACO optic by default, but it gets overwritten with "". The order of the attachments should be the same as in primaryWeaponItems ( [silencer, flashlight, optic] )

Additional Information

Right now, addding the current weapon of a unit to cargo or WeaponHolder through scripting commands is impossible to do right, as there is no way of specifying the correct attachments, magazines and bullet counts for weapons stored on cargo.

For players this has been taken care of in the following issue by @japapatramtara http://feedback.arma3.com/view.php?id=21469

Event Timeline

bux578 edited Steps To Reproduce. (Show Details)Dec 9 2014, 2:41 PM
bux578 edited Additional Information. (Show Details)
bux578 set Category to Scripting.
bux578 set Reproducibility to N/A.
bux578 set Severity to None.
bux578 set Resolution to Open.
bux578 set Legacy ID to 1853150511.May 7 2016, 7:57 PM
bux578 added a subscriber: japapatramtara.
Tachi added a subscriber: Tachi.May 7 2016, 7:57 PM
Tachi added a comment.Dec 31 2014, 2:59 PM

Add it NAW

Needed badly.

I would like to see this functionality in game, too :)