addBackpackGlobal: Difference between revisions
Jump to navigation
Jump to search
Killzone Kid (talk | contribs) mNo edit summary |
Lou Montana (talk | contribs) m (Fix page, change warning to a more academic style) |
||
Line 1: | Line 1: | ||
{{Command|= | {{Command|Comments= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| arma 3 | | | arma 3 |Game name= | ||
|arg= global|= | |arg= global|arguments= | ||
|eff= global|= | |eff= global|effect= | ||
|1.32| | |1.32|Game version= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| | | Add a backpack to a unit, [[local]] or remote.<br /> | ||
{{Warning | | <br /> | ||
_unit | {{Warning|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 }; {{codecomment|// needed if target is remote}} | |||
[[backpackContainer]] _unit [[addMagazineCargoGlobal]] ["30Rnd_556x45_Stanag", 5]; | |||
}} |Description= | |||
} | |||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| unit | | unit [[addBackpackGlobal]] backpackClass |Syntax= | ||
|p1= unit: [[Object]] - soldier | | |p1= unit: [[Object]] - soldier |Parameter 1= | ||
| [[Nothing]] | | |p2= backpackClass: [[String]] - backpack class name |Parameter 2= | ||
| [[Nothing]] |Return value= | |||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
|x1= <code>[[player]] [[addBackpackGlobal]] "B_AssaultPack_khk";</code> | | |x1= <code>[[player]] [[addBackpackGlobal]] "B_AssaultPack_khk";</code> |Example 1= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| [[addBackpack]], [[backpackContainer]], [[firstBackpack]] | | [[addBackpack]], [[backpackContainer]], [[firstBackpack]] | ||
[[unitBackpack]], [[backpack]], [[backpackCargo]] | |||
[[getBackpackCargo]], [[backpackItems]], [[addBackpackCargo]] | |||
[[addBackpackCargoGlobal]], [[removeBackpack]], [[clearBackpackCargo]] | |||
[[clearBackpackCargoGlobal]], [[clearAllItemsFromBackpack]], [[loadBackpack]] | |||
[[backpackSpaceFor]], [[canAddItemToBackpack]], [[addItemToBackpack]] | |||
[[removeItemFromBackpack]], [[everyBackpack]] |See also= | |||
}} | }} |
Revision as of 13:19, 6 February 2019
Description
- Description:
- Add a backpack to a unit, local or remote.
- 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