addWeaponWithAttachmentsCargoGlobal

From Bohemia Interactive Community
Revision as of 18:49, 5 June 2019 by Dedmen (talk | contribs) (Implement latest changes)
Jump to navigation Jump to search
-wrong parameter ("arma3dev") defined!-[[:Category:Introduced with arma3dev version 1.95|1.95]]
Hover & click on the images for description

Description

Description:
Add a weapon into cargo space of vehicles, but with pre-attached attachments/magazines. Ignores available cargo space.
This clears all pre-attached items if the weapon class has LinkedItems.
Groups:
Uncategorised

Syntax

Syntax:
container addWeaponWithAttachmentsCargoGlobal [weapon, muzzleAttachment, sideAttachment, topAttachment, bipodAttachment, [(primaryMagazine), (primaryAmmoCount), (secondaryMagazine), (secondaryAmmoCount)], (count)]
Parameters:
container: Object - Container to add the weapon to, might be backpack, ammobox or vehicle.
weapon: String - Weapon classname. See the topic Category:Weapons for reference about possible values.
muzzleAttachment: String - Muzzle attachment classname. If you don't want any just supply empty string.
sideAttachment: String - Side rail attachment classname. If you don't want any just supply empty string.
topAttachment: String - Top rail attachment classname. If you don't want any just supply empty string.
bipodAttachment: String - Underbarrel rail attachment classname. If you don't want any just supply empty string.
primaryMagazine (Optional): String - Primary magazine classname. If you don't want any just supply empty string or leave the whole magazine array empty.
primaryAmmoCount (Optional): Number - Ammo count in primary magazine. If you want a full magazine you can use -1.
secondaryMagazine (Optional): String - Secondary magazine classname. If you don't want any just supply empty string or leave the whole magazine array empty.
secondaryAmmoCount (Optional): Number - Ammo count in secondary magazine. If you want a full magazine you can use -1.
count (Optional): Number - Number of weapons to add. Default is 1.
Return Value:
Nothing

Examples

Example 1:
cursorTarget addWeaponWithAttachmentsCargoGlobal ["arifle_MX_GL_F", "muzzle_snds_H", "acc_flashlight", "optic_aco", "", ["30Rnd_65x39_caseless_mag", 15, "3Rnd_HE_Grenade_shell", 2], 2]
Example 2:
cursorTarget addWeaponWithAttachmentsCargoGlobal ["arifle_MX_GL_F", "", "acc_flashlight", "", "", ["30Rnd_65x39_caseless_mag", 30, "3Rnd_HE_Grenade_shell"], 2] Add's two MX GL rifles with flashlight side attachment and a full 30 round magazine loaded into the gun, and 3Rnd HE grenade magazine loaded into the grenade launcher
Example 3:
cursorTarget addWeaponWithAttachmentsCargoGlobal ["arifle_MX_GL_F", "", "", "", "", []] Same as a simple addWeaponCargo. This is the minimum number of arguments you need to supply.

Additional Information

See also:
addWeaponWithAttachmentsCargoaddWeaponCargoaddWeaponCargoGlobalclearWeaponCargogetWeaponCargo,

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

[[Category:Introduced with arma3dev version 1.95]][[ Category: arma3dev: New Scripting Commands | ADDWEAPONWITHATTACHMENTSCARGOGLOBAL]][[ Category: arma3dev: Scripting Commands | ADDWEAPONWITHATTACHMENTSCARGOGLOBAL]]

Bottom Section