addBackpackGlobal

From Bohemia Interactive Community
Revision as of 14:19, 6 February 2019 by Lou Montana (talk | contribs) (Fix page, change warning to a more academic style)
Jump to navigation Jump to search
Hover & click on the images for description

Description

Description:
Add a backpack to a unit, local or remote.

The backpack added with this command is created on the machine where unit is local. Because of this, if the unit is remote the backpackContainer command will return objNull.

The workaround is to wait for the backpack information's network synchronisation:

_unit addBackpackGlobal "B_AssaultPack_khk";
waitUntil { !isNull backpackContainer _unit }; // needed if target is remote
backpackContainer _unit addMagazineCargoGlobal ["30Rnd_556x45_Stanag", 5];
Groups:
Uncategorised

Syntax

Syntax:
unit addBackpackGlobal backpackClass
Parameters:
unit: Object - soldier
backpackClass: String - backpack class name
Return Value:
Nothing

Examples

Example 1:
player addBackpackGlobal "B_AssaultPack_khk";

Additional Information

See also:
addBackpackbackpackContainerfirstBackpack unitBackpackbackpackbackpackCargo getBackpackCargobackpackItemsaddBackpackCargo addBackpackCargoGlobalremoveBackpackclearBackpackCargo clearBackpackCargoGlobalclearAllItemsFromBackpackloadBackpack backpackSpaceForcanAddItemToBackpackaddItemToBackpack removeItemFromBackpackeveryBackpack

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

Bottom Section